Deploying your own on-prem k8s cluster has never been easier.
Setting Up a Kubernetes Cluster on Proxmox: Initial Steps
Setting up a Kubernetes cluster on Proxmox requires careful preparation and several prerequisite steps. This guide walks you through the essential initial setup process to ensure a smooth deployment.
Prerequisites
Before diving into the Kubernetes deployment, you’ll need to complete these critical setup steps:
Setup a Promox cluster
If you have not done so already, you’ll need to setup a proxmox cluster. I have a 3 node proxmox cluster setup in my homelab. I use this cluster to deploy multipule k8s clusters.
SSH Key Generation
Security is paramount when managing your cluster. Start by creating SSH keys for authentication.
-
- Open your terminal
- Generate a new SSH key using:
ssh-keygen -t ed25519 -C "your_email@example.com"
- Follow the prompts to save and secure your key
- Add the key to your SSH agent
For detailed instructions on SSH key generation, refer to GitHub’s comprehensive documentation on generating SSH keys.
Package Installation
Create an Virtual Environment in python using
python -m venv venv
The deployment process requires specific Python packages. Install them using pip:
pip3 install -r requirements.txt
Make sure you’re in your project directory when running this command, as it relies on the presence of a requirements.txt file.
Proxmox Template Creation
A properly configured VM template in Proxmox is crucial for your Kubernetes deployment. Key steps include:
- Setting up a base VM
- Configuring networking through netplan
- Converting the VM to a template
This process requires careful attention to networking configuratio n. The template will serve as the foundation for all your Kubernetes nodes, so proper setup is essential.
For a visual guide through the template creation process, check out this detailed tutorial.
Next Steps
After completing these prerequisites, you’ll be ready to begin the actual Kubernetes cluster deployment. The template you’ve created will be used to spawn both control plane and worker nodes, while the SSH keys will ensure secure access to your cluster components.
Keep your SSH keys secure and remember the template configuration details - you’ll need them throughout the deployment process.