Difficulty: beginner
Estimated Time: 10-15 minutes

In this scenario, you'll learn how to add additional nodes to a Kubernetes cluster. This allows you to start exploring scaling and scheduling approaches of Kubernetes.

In future scenarios we'll use this foundation to simulate network errors and application errors that may occur in a distributed system.

This scenario has explained how to launch a Kubernetes cluster. In future scenarios you'll learn more details about Kubernetes, starting with launching your first example application.

Add Additional Nodes To Existing Cluster

Step 1 of 4

Step 1 - Start Cluster

The command below will initialise the cluster with a known token to simplify the following steps.

kubeadm init --token=102952.1a7dd4cc8d1f4cc5 --kubernetes-version $(kubeadm version -o short)

In production, it's recommend to exclude the token causing kubeadm to generate one on your behalf.

The command copies the configuration to the users home directory and sets the environment variable for use with the CLI.

sudo cp /etc/kubernetes/admin.conf $HOME/
sudo chown $(id -u):$(id -g) $HOME/admin.conf
export KUBECONFIG=$HOME/admin.conf

The admin.conf file includes the certificates required to access a cluster as an administrator.

Terminal Host 2