Running Kubernetes on Proxmox LXC: A Comprehensive Guide
In the rapidly evolving landscape of containerization and virtualization, Proxmox and Kubernetes have emerged as powerful tools. Proxmox, with its built-in LXC containers, offers a robust and flexible platform, while Kubernetes provides a portable, extensible, and open-source platform for managing containerized workloads and services. This guide will walk you through the process of setting up Kubernetes on Proxmox LXC, ensuring high availability, scalability, and fault tolerance.
Understanding Proxmox LXC and Kubernetes
Before we dive into the setup process, let's briefly understand both Proxmox LXC and Kubernetes.
- Proxmox LXC: LXC (Linux Containers) is a system containerization method that uses Linux's built-in features to provide process-level isolation. Proxmox, an open-source platform, leverages LXC to provide lightweight, high-performance virtualization.
- Kubernetes: Originally developed by Google, Kubernetes is an open-source platform designed to automate deploying, scaling, and operating application containers. It groups containers into logical units for easy management and discovery.
Prerequisites
Before you begin, ensure you have the following:

- A Proxmox cluster with at least one master node and one worker node.
- Access to the Proxmox web interface with appropriate privileges.
- Basic understanding of Linux commands and containerization concepts.
Setting Up the Proxmox Cluster
Before installing Kubernetes, ensure your Proxmox cluster is set up correctly. This includes configuring the network, enabling high availability, and setting up resource pools.
For detailed steps, refer to the official Proxmox documentation: Proxmox Cluster Settings.
Installing Kubernetes on Proxmox LXC
Now that your Proxmox cluster is ready, let's install Kubernetes. We'll use k3s, a certified Kubernetes distribution built for edge and resource-constrained environments.

Installing k3s on the Master Node
Log in to your master node via SSH and run the following command to install k3s:
curl -sfL https://get.k3s.io | sh -
Once installed, verify the k3s service is running:
sudo systemctl status k3s
Installing k3s on Worker Nodes
Install k3s on each worker node in the same way as the master node. After installation, join the nodes to the cluster using the following command on each worker node:

curl -sfL https://<MASTER_NODE_IP>:6443 --header "Content-Type: application/x-www-form-urlencoded; charset=utf-8" --request POST --data "token=<TOKEN>" --insecure
Replace <MASTER_NODE_IP> with your master node's IP address and <TOKEN> with the token displayed on the master node after installation.
Verifying the Kubernetes Cluster
Back on the master node, verify that your worker nodes have joined the cluster:
kubectl get nodes
You should see all your worker nodes listed and ready.
Deploying Your First Application
Now that your Kubernetes cluster is up and running, you can deploy your first application. Here's a simple example using the nginx deployment and service:
kubectl apply -f https://k8s.io/examples/application/guestbook/guestbook.yaml
For more complex deployments, explore the official Kubernetes documentation: Kubernetes Documentation.
Conclusion
In this guide, we've walked through the process of setting up Kubernetes on Proxmox LXC, from configuring the Proxmox cluster to deploying your first application. By leveraging both platforms, you can achieve high availability, scalability, and fault tolerance for your containerized workloads.






















