Setting up Kubernetes
How did we set up these Kubernetes clusters that we're using?
We used
kubeadm
on freshly installed VM instances running Ubuntu LTSInstall Docker
Install Kubernetes packages
Run
kubeadm init
on the first node (it deploys the control plane on that node)Set up Weave (the overlay network)
(that step is just onekubectl apply
command; discussed later)Run
kubeadm join
on the other nodes (with the token produced bykubeadm init
)Copy the configuration file generated by
kubeadm init
Check the prepare VMs README for more details
kubeadm
drawbacks
Doesn't set up Docker or any other container engine
Doesn't set up the overlay network
Doesn't set up multi-master (no high availability)
(At least ... not yet! Though it's experimental in 1.12.)
- "It's still twice as many steps as setting up a Swarm cluster 😕" -- Jérôme
Other deployment options
AKS: managed Kubernetes on Azure
GKE: managed Kubernetes on Google Cloud
kops: customizable deployments on AWS, Digital Ocean, GCE (beta), vSphere (alpha)
minikube, kubespawn, Docker Desktop: for local development
kubicorn, the Cluster API: deploy your clusters declaratively, "the Kubernetes way"
Even more deployment options
If you like Ansible: kubespray
If you like Terraform: typhoon
If you like Terraform and Puppet: tarmak
You can also learn how to install every component manually, with the excellent tutorial Kubernetes The Hard Way
Kubernetes The Hard Way is optimized for learning, which means taking the long route to ensure you understand each task required to bootstrap a Kubernetes cluster.
There are also many commercial options available!
For a longer list, check the Kubernetes documentation:
it has a great guide to pick the right solution to set up Kubernetes.