Difficulty: intermediate
Estimated Time: 10-15 minutes

Getting Started with Kubeadm

In this scenario you will setup a Kubernetes cluster using the bootstrap method with kubeadm.

kubeadm is by far the simplest way to set up and configure a Kubernetes cluster. With only a few simple commands, an entire cluster is up and running across multiple hosts.

Kubernetes is a container orchestrator that can manage 1000s of containers across multiple hosts all in clusters.

In this example, you will set up two nodes: one is the master, the other is a worker node that runs the application.

The command line utility kubectl manages the entire Kubernetes cluster and all deployed applications from the master node.

The network layer for the pods is provided by Weave Net and it is installed separately.

Since this is a sandbox environment, some of the steps have already been configured for you. For example the binaries for the command line tool, kubectl have already been downloaded and set up on the machines.

Getting Started With Kubeadm

Step 1 of 8

Step 1 - Initialise Master

To begin make one of the Kubernetes nodes the master:

1. Initialize the master on the first machine:

kubeadm init --kubernetes-version v1.7.8

2. Next, copy the credentials to access the server:

mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
Terminal Host 2