MakeStack
Back to Feed

Prepare minikube with Cilium and Gateway API

Build a local minikube cluster with Docker driver, pinned Gateway API CRDs, Helm, and Cilium with kube-proxy replacement.

Starting point#

This setup creates a local minikube cluster with Docker driver, Gateway API, Helm, and Cilium networking.

This is a local development cluster, not a production cluster layout.

Tested versions#

ToolVersion
Docker Engine29.5.3
minikube1.38.1
kubectl1.36.2
Gateway API1.2.1
Helm4.2.2
Cilium1.13.1

Install tools#

Install Docker first so minikube can run the cluster with the Docker driver.

Examplesh
curl -fsSL https://get.docker.com | sh && \
sudo usermod -aG docker $USER

Install minikube and check that the binary is available.

Examplesh
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && \
sudo install minikube-linux-amd64 /usr/local/bin/minikube && \
rm minikube-linux-amd64 && \
minikube version

Install kubectl separately so the same command style works for local and remote clusters.

Examplesh
sudo mkdir -p /etc/apt/keyrings

curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.36/deb/Release.key | \
  sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg && \
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.36/deb/ /' | \
  sudo tee /etc/apt/sources.list.d/kubernetes.list && \

sudo apt update && \ 
sudo apt install -y kubectl && \
kubectl version --client

Install Helm before installing Cilium from its chart.

Examplesh
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-4 | bash

Start minikube#

Start minikube without the default CNI and skip kube-proxy because Cilium will provide the networking path.

Examplesh
export PROFILE=minikube
export K8S_VERSION=v1.35.1

minikube start -p "$PROFILE" \
  --driver=docker \
  --container-runtime=docker \
  --kubernetes-version="$K8S_VERSION" \
  --cni=false \
  --extra-config=kubeadm.skip-phases=addon/kube-proxy \
  --wait=false

Install Gateway API CRDs#

Install the pinned Gateway API CRDs before enabling Gateway API support in Cilium.

Examplesh
export GATEWAY_API_VERSION=v1.2.1

kubectl apply -f \
  "https://github.com/kubernetes-sigs/gateway-api/releases/download/${GATEWAY_API_VERSION}/standard-install.yaml"

Install Cilium#

Use the minikube IP as the Kubernetes API host for Cilium. Keep one operator replica for a single-node cluster.

Examplesh
export API_HOST="$(minikube ip -p "$PROFILE")"
export CILIUM_VERSION=1.13.1

helm repo add cilium https://helm.cilium.io/ && \
helm repo update && \
helm install cilium cilium/cilium --version "$CILIUM_VERSION" \
  --namespace kube-system \
  --set-string kubeProxyReplacement=strict \
  --set k8sServiceHost="$API_HOST" \
  --set k8sServicePort=8443 \
  --set gatewayAPI.enabled=true \
  --set l7Proxy=true \
  --set envoy.enabled=true \
  --set operator.replicas=1

Useful checks#

Use these commands to check the cluster or remove the profile when the test is finished.

Examplesh
minikube ip
Examplesh
minikube status
Examplesh
minikube logs
Examplesh
minikube profile list
Examplesh
minikube addons enable dashboard
Examplesh
minikube addons enable metrics-server
Examplesh
minikube delete -p <profile-name>
Examplesh
kubectl get nodes
Examplesh
kubectl get pods -n kube-system