Deploying Kubernetes on Proxmox: A Comprehensive Guide
In the rapidly evolving landscape of container orchestration, Kubernetes has emerged as a powerful tool for automating deployment, scaling, and management of containerized applications. Proxmox, an open-source platform for virtualization and containerization, provides an excellent foundation for running Kubernetes clusters. This guide will walk you through the process of deploying Kubernetes on Proxmox, ensuring a smooth and efficient setup.
Prerequisites
Before we begin, ensure you have the following prerequisites in place:
- Proxmox VE 6.x or later installed on your host.
- A valid subscription or access to the Proxmox repository.
- Basic understanding of Linux commands and containerization concepts.
Installing Docker on Proxmox
Kubernetes requires Docker to be installed on the nodes. Here's how to install Docker on Proxmox:

# Install Docker
apt update
apt install docker-ce docker-ce-cli containerd.io
# Add your Proxmox user to the docker group
usermod -aG docker your_username
# Start and enable Docker service
systemctl start docker
systemctl enable docker
Setting Up the Kubernetes Repository
Next, we'll add the Kubernetes signing key and repository to our system:
# Add the Kubernetes signing key
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
# Add the Kubernetes repository
cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF
# Update the package list
apt update
Installing Kubernetes Components
Now, we'll install the core Kubernetes components: kubelet, kubeadm, and kubectl.
# Install Kubernetes components
apt install -y kubelet kubeadm kubectl
# Hold the installed versions to prevent automatic upgrades
apt-mark hold kubelet kubeadm kubectl
Initializing the Kubernetes Cluster
With the components installed, we can initialize our Kubernetes cluster using kubeadm:

# Initialize the cluster
kubeadm init --pod-network-cidr=10.244.0.0/16
Follow the on-screen instructions to set up your kubeconfig file and install a pod network add-on (e.g., Flannel or Calico).
Joining Worker Nodes to the Cluster
To scale your cluster, you can add worker nodes by running the following command on each node, replacing MASTER_IP with your master node's IP address:
# Join a worker node to the cluster
kubeadm join MASTER_IP:MASTER_PORT --token YOUR_TOKEN --discovery-token-ca-cert-hash YOUR_HASH
Verifying the Cluster
Once your nodes have joined the cluster, you can verify their status with the following command:

# Get the list of nodes in the cluster
kubectl get nodes
You should see all your nodes listed with a status of Ready.
Conclusion and Next Steps
Congratulations! You have successfully deployed a Kubernetes cluster on Proxmox. Now that your cluster is up and running, you can start deploying applications and exploring the vast ecosystem of Kubernetes tools and services. For further reading, consider exploring the official Kubernetes documentation and Proxmox Kubernetes guide.






















