- Create EC2 Instance from UBUNTU AMI with type t2.medium (2 core CPU and 4GB Ram)
- Github URL: https://github.com/artisantek/kubernetes-installation
git clone https://github.com/artisantek/kubernetes-installation
cd kubernetes-installation
bash install-kubernetes-1.30.sh
STEP 2: Kubernetes node template is now ready create an AMI from this instance to create worker nodes
- Right-click on the instance you want to use as the basis for your AMI or Click-on Actions button.
- Action --> Image --> Create Image
Once the Ami is available (usually it takes 2-8 minutes to get ready), create 2 instances with t2.micro to create worker nodes.
sudo su
kubeadm init
Note: Copy the command along with token generated and keep it in a separate file, we need to run this command on worker nodes
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
sudo su --> To goto root user
kubeadm join <TOKEN> [Command from STEP 3] --> To connect worker node to Master
kubectl get nodes