Minikube can run without Docker Desktop, using Podman as its backend driver.
Here’s how to set it up and what it looks like in action.
First, ensure you have Podman installed. On macOS, you can install it via Homebrew:
brew install podman
On Linux, installation methods vary by distribution. For example, on Fedora:
sudo dnf install podman
Now, you can start Minikube with the Podman driver. The command is straightforward:
minikube start --driver=podman
This command tells Minikube to use Podman to manage the virtual machine and container runtime for your local Kubernetes cluster. You’ll see output similar to this as Minikube provisions the environment:
▪️ Podman machine initializing...
▪️ Downloading machine image...
▪️ Starting machine...
▪️ Machine IP: 10.8.10.10
▪️ Waiting for node to be ready...
▪️ Installing Kubernetes...
▪️ Pulling images...
▪️ Starting cluster components...
▪️ Setting up kubectl...
▪️ Podman machine configured.
Once started, you can verify your Kubernetes context is set to Minikube:
kubectl config current-context
This should output minikube. You can then check the status of your nodes:
kubectl get nodes
Output:
NAME STATUS ROLES AGE VERSION
minikube Ready control-plane 5m v1.28.3
To see Podman in action, let’s deploy a simple Nginx pod. First, create a deployment YAML file (e.g., nginx-deployment.yaml):
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 1
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
Apply this deployment:
kubectl apply -f nginx-deployment.yaml
Now, check your running pods:
kubectl get pods
Output:
NAME READY STATUS RESTARTS AGE
nginx-deployment-7c6b6f7b7d-abcde 1/1 Running 0 30s
To expose this Nginx pod, create a service:
apiVersion: v1
kind: Service
metadata:
name: nginx-service
spec:
selector:
app: nginx
ports:
- protocol: TCP
port: 80
targetPort: 80
type: LoadBalancer
Apply the service:
kubectl apply -f nginx-service.yaml
Minikube with the Podman driver uses podman machine ssh to tunnel traffic. You can get the service IP using:
minikube service nginx-service --url
This will output a URL, something like http://192.168.49.2:31234. Accessing this URL in your browser should show the default Nginx welcome page.
Behind the scenes, Minikube creates a Podman machine (a lightweight VM) and configures it to run your Kubernetes components. Podman itself acts as the container runtime within this machine. When you run kubectl commands, they are translated by Minikube into actions that Podman performs on the Podman machine.
The key advantage here is avoiding the need for Docker Desktop. Podman is a daemonless container engine, which some find simpler to manage, especially in Linux environments. It also integrates well with systemd.
What most people don’t realize is how Podman’s system integration, particularly its ability to run rootless containers by default (though Minikube often runs it with root privileges within the VM for easier management), affects the underlying resource consumption and security posture compared to Docker’s daemon-based approach. For instance, rootless Podman uses user namespaces to isolate containers, which is a fundamentally different isolation mechanism than what Docker traditionally offered.
The next step in exploring this setup would be to understand how to manage storage volumes and persistent data when using the Podman driver, as the underlying VM and its filesystem behave slightly differently than a Docker Desktop VM.