Building A Kubernetes Cluster
Building A Kubernetes Cluster
Relevant Documentation
Installing kubeadm
Creating a cluster with kubeadm
Lesson Reference
If you are using cloud playground, create three servers with the following settings:
If you wish, you can set an appropriate hostname for each node.
On all nodes, set up the hosts file to enable all the nodes to reach each other using these hostnames.
sudo vi /etc/hosts
On all nodes, add the following at the end of the file. You will need to supply the actual private IP address for each node.
Log out of all three servers and log back in to see these changes take effect.
On all nodes, set up containerd. You will need to load some kernel modules and modify some system settings as part of this
process.
cat << EOF | sudo tee /etc/modules-load.d/containerd.conf
overlay
br_netfilter
EOF
sudo swapoff -a
On the control plane node only, initialize the cluster and set up kubectl access.
mkdir -p $HOME/.kube
Get the join command (this command is also printed during kubeadm init . Feel free to simply copy it from there).
Copy the join command from the control plane node. Run it on each worker node as root (i.e. with sudo ).
On the control plane node, verify all nodes in your cluster are ready. Note that it may take a few moments for all of the nodes to
enter the READY state.