What does HackerNews think of kubespray?
Deploy a Production Ready Kubernetes Cluster
[0]: https://github.com/kubernetes-sigs/kubespray
[1]: https://www.tauceti.blog/
[2]: https://www.tauceti.blog/posts/kubernetes-the-not-so-hard-wa...
[3]: https://k3s.io/
[5]: https://vmarchaud.fr/deploying-kubernetes-the-hard-way/
I use kubespray[2] to manage my raspberry pi based k8s homelab, and replacing any nodes, including HA control plane nodes, is as easy as swapping the board and executing an ansible playbook. The downsides of this, are that it requires the users to have more knowledge about operating k8s, and a single ansible playbook run takes 30-40 minutes...
There was also CoreOS, which has since been bought by RedHat, and Deis, since bought by Microsoft.
So now it's been turned back into an OS war. RedHat, SuSE, and Microsoft.This is fitting because kubernetes feels like an operating system for container clusters. After all, operating systems are just resource managers and schedulers like kubernetes is.
(For those interested, there are several kubernetes distributions that are not company backed and open source. Two of my favorites are Kubespray[1] and Typhoon[2].)
1: https://github.com/kubernetes-sigs/kubespray 2: https://typhoon.psdn.io/
Step 2: Update /etc/hosts on all the nodes vagrant@amaster:~$ sudo vi /etc/hosts 100.0.0.1 amaster.jhooq.com amaster 100.0.0.2 kmaster.jhooq.com kmaster 100.0.0.3 kworker.jhooq.com kworker
Step 3: Generate SSH key for ansible vagrant@amaster:~$ ssh-keygen -t rsa
Step 4: Copy SSH key to other nodes vagrant@amaster:~$ ssh-copy-id 100.0.0.2 vagrant@amaster:~$ ssh-copy-id 100.0.0.3
Step 5: Install python3-pip vagrant@amaster:~$ sudo apt install python3-pip
Step 6: Clone the kubespray git repo vagrant@amaster:~$ git clone https://github.com/kubernetes-sigs/kubespray.git
Step 7: Install kubespray package vagrant@amaster:~/kubespray$ sudo pip3 install -r requirements.txt
Step 8: Copy inventory file to current users vagrant@amaster:~/kubespray$ cp -rfp inventory/sample inventory/mycluster
Step 9: Prepare host.yml for kubespray vagrant@amaster:~/kubespray$ declare -a IPS=(100.0.0.2 100.0.0.3)
vagrant@amaster:~/kubespray$ CONFIG_FILE=inventory/mycluster/hosts.yml python3 contrib/inventory_builder/inventory.py ${IPS[@]}
Step 10: Run the ansible-playbook on ansible node ansible-playbook -i inventory/mycluster/hosts.yml --become --become-user=root cluster.yml
Step 11: Install kubectl on kubernetes master vagrant@node1:~$ curl -LO https://storage.googleapis.com/kubernetes-release/release/`c... -s https://storage.googleapis.com/kubernetes-release/release/st...
vagrant@node1:~$ sudo cp /etc/kubernetes/admin.conf /home/vagrant/config vagrant@node1:~$ mkdir .kube vagrant@node1:~$ mv config .kube/ vagrant@node1:~$ sudo chown $(id -u):$(id -g ) $HOME/.kube/config
Step 12: Verify the kubernetes nodes vagrant@node1:~$ kubectl get nodes NAME STATUS ROLES AGE VERSION node1 Ready master 13m v1.18.2 node2 Ready master 13m v1.18.2
As for provisioning, I mentioned GKE already, but I can throw in some more:
https://www.scaleway.com/en/docs/get-started-with-scaleway-k... https://www.ovh.com/world/public-cloud/kubernetes/ https://github.com/bbelky/hkube https://github.com/kubernetes-sigs/kubespray