Post

Minikube - Cilium Lab

Minikube - Cilium Lab

Hello Everyone!

In this post, I’d like to talk a bit about Minikube. Chances are, most of you have already used Minikube at some point, or at least heard about it during your journey with Kubernetes.

Recently, I’ve been preparing for the Cilium Certified Associate (CCA). My goal is to build a solid understanding of Cilium and explore what I can achieve with it. While studying for the certification, I’ve been using Isovalent’s Cilium Labs Platform, which provides a remote Desktop environment where you can follow and complete hands-on exercises.

While learning, I wanted to try the examples on my own computer. So, I needed a Kubernetes Engine that is easy to use and not too heavy. That’s why I chose Minikube. It was a great option for running Kubernetes locally.

In this post, I’ll walk you through:

  • how to install and start Minikube,
  • how to add new nodes,
  • wow can we install Cilium
  • and some of the benefits that come with it.

Let’s get started!


Installing Minikube

In this section, I’ll walk you through how I installed and configured Minikube on my local machine for use with Cilium.

Installing Minikube is very easy. You can simply run brew install minikube to install it. You can check the official docs for more details.

Now let’s start Minikube. Normally, you can just run minikube start to launch it. But in my case, I will deploy Cilium CNI with my own configuration, so I don’t want Minikube to install any default CNI.

I also want to use the latest Kubernetes version. If you want to use a specific version, you can do that by adding the --kubernetes-version=v1.31.4 flag when starting Minikube.

1
minikube start --network-plugin=cni --cni=false

After starting Minikube, your terminal will automatically use the minikube/default kube-context. If you open a new terminal tab later or want to switch back to Minikube, just run minikube update-context.

Another important command is minikube ip. This shows the external IP address of the Minikube VM. You can use this IP to access services exposed via NodePort or LoadBalancer (when you run minikube tunnel).

When the cluster starts, you’ll have one control-plane node by default. If you need more nodes, adding them in Minikube is very simple.

To add a worker node, run:

1
minikube node add --worker

If you want to add another control-plane node, just add the --control-plane flag.

To delete a node, use minikube node delete <node-name>.


Installing Cilium

If you’re on macOS, you can install the CLI by running brew install cilium-cli in your terminal.

After installation, verify it with cilium help to make sure everything is set up correctly. This command will show you the available options and confirm that the CLI is working as expected. In this setup, I want to use Gateway API features that come with Cilium. To make that work, I will enable Gateway API support during the installation.

Here are a few important points:

  • Gateway API lets you manage traffic into your cluster in a modern way.
  • To use Gateway API, you must also enable kube-proxy replacement.
  • This gives you full eBPF-based networking, which is one of Cilium’s best features.
  • You can learn more about these options in the official Cilium documentation.

Now we can go ahead and install Cilium. I’m simply specifying the version and enabling the features I need:

1
2
3
4
cilium install --version v1.17.4 \
  --namespace kube-system \
  --set kubeProxyReplacement=true \
  --set gatewayAPI.enabled=true 

After the installation, you can check if everything is working by running cilium status --wait. The –wait flag tells the command to wait until all components are ready. This is useful to make sure the installation was successful.

If you’re curious about which features are enabled in your setup, you can run cilium config view. This command will show the current configuration of Cilium, including all enabled options.

To use the Gateway API, you need to deploy the CRDs listed here to your cluster.

If you prefer to deploy it using Helm, you can follow the official documentation here.