https://github.com/dyrnq/kubeadm-vagrant
Run kubernetes cluster with kubeadm on vagrant.
https://github.com/dyrnq/kubeadm-vagrant
containerd cri-o docker helm kubeadm kubeadm-cluster kubeadm-ha kubernetes nerdctl vagrant vagrantfile virtualbox
Last synced: 6 months ago
JSON representation
Run kubernetes cluster with kubeadm on vagrant.
- Host: GitHub
- URL: https://github.com/dyrnq/kubeadm-vagrant
- Owner: dyrnq
- Created: 2021-07-18T09:31:09.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-14T01:42:26.000Z (almost 3 years ago)
- Last Synced: 2025-03-26T14:50:17.819Z (6 months ago)
- Topics: containerd, cri-o, docker, helm, kubeadm, kubeadm-cluster, kubeadm-ha, kubernetes, nerdctl, vagrant, vagrantfile, virtualbox
- Homepage:
- Size: 102 KB
- Stars: 1
- Watchers: 1
- Forks: 5
- Open Issues: 38
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# kubeadm-vagrant
Run kubernetes cluster with kubeadm on vagrant.
> **Reference:** [Creating Highly Available clusters with kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/high-availability/)
## Requirements
1. virtualbox: [https://www.virtualbox.org/wiki/Downloads](https://www.virtualbox.org/wiki/Downloads)
2. vagrant: [https://www.vagrantup.com/downloads.html](https://www.vagrantup.com/downloads.html)## Usage
### Single-Master
Change `MASTER_COUNT` to `1` to run a Single-Master.
```bash
vagrant up master1 worker1
vagrant ssh master1kubectl cluster-info
kubectl get nodes
```### Multi-Master
Change `MASTER_COUNT` to `3` to run a Multi-Master cluster.
```bash
vagrant up master1 master2 master3 worker1
vagrant ssh master1kubectl cluster-info
kubectl get nodes
```## Pod Network
> **Reference:** [Installing a Pod network add-on](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#pod-network)
### calico
Change `POD_NETWORK` to `/vagrant/kube-calico.yaml` to run use calico. See origin [calico.yaml](https://docs.projectcalico.org/archive/v3.21/manifests/calico.yaml)
`kube-calico.yml` changes: explicitly assign env `CALICO_IPV4POOL_CIDR` and `IP_AUTODETECTION_METHOD`
### flannel
Change `POD_NETWORK` to `/vagrant/kube-flannel.yml` to run use flannel. See origin [kube-flannel.yml](https://github.com/flannel-io/flannel/blob/master/Documentation/kube-flannel.yml)
`kube-flannel.yml` changes: added the `--iface` option ([ref](https://github.com/coreos/flannel/blob/master/Documentation/troubleshooting.md#vagrant))
## Ref
- [https://github.com/tsl0922/kubeadm-vagrant](https://github.com/tsl0922/kubeadm-vagrant)
- [https://github.com/coolsvap/kubeadm-vagrant](https://github.com/coolsvap/kubeadm-vagrant)
- [https://github.com/hub-kubernetes/kubernetes-multi-master](https://github.com/hub-kubernetes/kubernetes-multi-master)
- [https://github.com/luckylucky421/kubernetes1.17.3](https://github.com/luckylucky421/kubernetes1.17.3)