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 LTS

    1. Install Docker

    2. Install Kubernetes packages

    3. Run kubeadm init on the first node (it deploys the control plane on that node)

    4. Set up Weave (the overlay network)
      (that step is just one kubectl apply command; discussed later)

    5. Run kubeadm join on the other nodes (with the token produced by kubeadm init)

    6. 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

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.