Skip to content

Set up minikube on Windows

In my work as n8n's tech writer, I need to maintain some Kubernetes-based deployment guides. This blog post contains the steps for setting up minikube and kubectl on Windows, running it, and testing n8n's Kuberenetes hosting configurations. This is a letter to my future self. Some steps are n8n-specific, but this can also serve as a quick guide for any Kubernetes testing.

Install minikube and kubectl

  1. Follow Step 1 of the minikube installation guide. Note the dependencies: make sure you have Docker installed and running. You'll already have this if you followed your Setting up a new Windows PC guide.
  2. Start minikube, with extra CPUs:
    minikube start --cpus 4
    
    The default CPUs is 2. This isn't enough for n8n.
  3. Install kubectl:
    minikube kubectl -- get po -A
    Set-Alias -Name kubectl -Value "minikube kubectl --"
    

Test an n8n configuration

  1. Clone the repo and navigate into the new directory:
    git clone https://github.com/n8n-io/n8n-kubernetes-hosting.git
    cd n8n-kubernetes-hosting
    
  2. Create a new resource:
    kubectl apply -f .
    
    If you get errors, re-run the command. On first setup, there is (in effect) a race condition where different parts of the configuration rely on each other, but they're all being set up.
  3. Check if everything is working:
    kubectl -n n8n get pod
    
    Status should be Running. If it says Pending or ContainerCreating, try again in a few minutes.
  4. Set up port forwarding so you can access n8n in your browser:
    kubectl port-forward -n n8n svc/n8n 5678
    
    n8n is now available on localhost:5678.

Clean up

  1. kubectl delete -f .
  2. minikube stop

Hire me for a docs consultation