In this chapter we discuss multiple ways to set up a full-blown Kubernetes cluster. We cover low-level, standardized tooling (
kubeadm) that also serves as the basis for other installers and show you where to find the relevant binaries for the control plane, as well as for worker nodes. We discuss a containerized Kubernetes setup with
hyperkube, demonstrate how to write
systemd unit files to supervise Kubernetes components, and finally show how to set up clusters in Google Cloud and on Azure.
You want to use
kubeadm to bootstrap a Kubernetes cluster from scratch.
kubeadm CLI tool from the Kubernetes package repository.
You will need
kubeadm installed on all the servers that will be part of your Kubernetes cluster—not only the master, but also all the nodes.
For example, if you are using Ubuntu-based hosts, on each host do the following as root to set up the Kubernetes package repository:
# apt-get update && apt-get install -y apt-transport-https # curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - # cat <<EOF >/etc/apt/sources.list.d/kubernetes.list deb http://apt.kubernetes.io/ kubernetes-xenial main EOF # apt-get update
Now you can install the Docker engine and the various Kubernetes tools. You will need the following:
kubernetes-cni, the Container Networking Interface ...