Stand up Kubernetes
We will install Calico on a Kubernetes cluster. To demonstrate a highly available Calico control plane, we will use five nodes in this guide. This lab walks you through provisioning a Kubernetes cluster in AWS using kubeadm.
Provision EC2 Nodes
- Provision five nodes
- Ubuntu 18.04 LTS
- Ensure the instances are in the same subnet, and security group policy allows them communicate freely with one another.
- Disable Source / Destination Checks on the Elastic Network Interface for each instance
- Install Docker on each node
sudo apt update
sudo apt install docker.io
sudo systemctl enable docker
- Install kubeadm, kubelet, kubectl by following (official documentation)[https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#installing-kubeadm-kubelet-and-kubectl].
Choose one node as your Kubernetes master. On that node
sudo kubeadm init --pod-network-cidr=192.168.0.0/16
pod-network-cidris the IP prefix for all pods in the Kubernetes cluster. This range must not clash with other networks in your VPC.
- On all other nodes
sudo kubeadm join <output from kubeadm init>
- Copy admin credentials
- Test Access
kubectl get nodes
Verify all nodes have joined. At this point nodes have joined but they are in
NotReadystate, because Kubernetes can’t find a networking provider and configuration.