Master Node
Configurations
After getting getting my Ubuntu Server up and running, installing qemu-guest-agent, and upgrading all packages, I took a snapshot of the VM to have something to rollback to incase I mess up at any point. Taking snapshots is a great practice especially when learning new technologies, as it saves you time from recreating from scratch. The following are steps I took on my Master-Node to configure and prepare it for my Kubernetes Cluster.
Disable Swap
Run the command in your terminal window to temporarily disable swap:
sudo swapoff -a
Run the command to edit the fstab file and comment out and keep swap turned off even after reboots:
sudo nano /etc/fstab
Run the command to view swap usage:
free -m
Set Static IP & Hostname
Configure IPv4 Bridge
Install kubelet, kubeadm, kubectl
Install Docker
Run the command to install Docker:
sudo apt install docker.io -y
Install kubectl using Native Package Management
Run the command to install necessary packages in order to use the Kubernetes apt packages:
sudo apt-get install -y apt-transport-https ca-certificates curl
Run the command to make sure you have the "keyrings" directory prior to downloading the public signing key:
ls -l /etc/apt
Download the public signing key for Kubernetes package repositories. I'm downloading the most current stable release v1.29:
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
Run the command to add the Kubernetes apt repositories:
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list
Run the commands to update and upgrade apt repository and packages, and then install kubectl:
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install -y kubectl