Install Kubernetes on Debian Sid
Step-by-step guide to installing Kubernetes on Debian Sid using Minikube for local development and testing.
Prerequisites
This guide assumes you’re running Debian Sid and want to set up a local Kubernetes cluster using Minikube.
Step 1: Install Runtime Dependencies
Install the required virtualization and container runtime dependencies:
apt-get install qemu-kvm libvirt-daemon-system virtualbox virtualbox-dkms
These packages provide:
- qemu-kvm: KVM virtualization support
- libvirt-daemon-system: Virtualization management
- virtualbox: Alternative virtualization platform
- virtualbox-dkms: VirtualBox kernel modules
Step 2: Install Minikube and kubectl
Download and Install Minikube
# Download Minikube
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
# Make executable and install
chmod +x minikube
sudo mv minikube /usr/local/bin/
Download and Install kubectl
# Download kubectl
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
# Make executable and install
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
Step 3: Prepare User Environment
Add your user to the required groups for virtualization access:
sudo usermod -aG docker $USER
sudo usermod -aG kvm $USER
sudo usermod -aG libvirt $USER
Important: Log out and log back in (or reboot) for group changes to take effect.
Step 4: Start Minikube
Start your local Kubernetes cluster:
minikube start --vm-driver virtualbox
Alternative VM drivers:
--vm-driver kvm2(requires additional setup)--vm-driver none(runs directly on host)
Step 5: Verify Installation
Check that everything is working:
# Check cluster information
kubectl cluster-info
# List cluster nodes
kubectl get nodes
# Check Minikube status
minikube status
Expected output should show:
- Kubernetes master running
- One node in “Ready” state
- Minikube components running
Useful Commands
Managing the Cluster
# Stop the cluster
minikube stop
# Delete the cluster
minikube delete
# Open Kubernetes dashboard
minikube dashboard
# SSH into the Minikube VM
minikube ssh
kubectl Basics
# Get cluster information
kubectl cluster-info
# List all pods
kubectl get pods --all-namespaces
# Create a deployment
kubectl create deployment hello-world --image=gcr.io/google-samples/hello-app:1.0
References
For more detailed information, consult the official documentation:
Troubleshooting
VirtualBox Issues
If VirtualBox fails to start, ensure:
- Virtualization is enabled in BIOS
- Secure Boot is disabled
- VirtualBox kernel modules are loaded
Permission Issues
If you get permission errors:
- Verify user is in correct groups:
groups $USER - Restart your session after adding groups
- Check
/var/run/libvirt/libvirt-sockpermissions
This setup provides a complete local Kubernetes environment perfect for development, testing, and learning Kubernetes concepts.