Minikube 1.6.2 + Cilium 1.6.5 on Ubuntu 19.10


It's time to refresh one of my Minikube installations- I'd like to play around with Cilium some more and Minikube is the most direct route to a functioning test cluster. The last time I set up a Minikube/Cilium was back in 2018 and I hope the installation is more streamlined now.

My purpose in this is to minimize what is installed to my host workstation. I prefer a greater degree of isolation between my host and experiments.

References

Pre-Requirements

First, install a copy of Ubuntu into a virtual machine (I'm using version 19.10). You can use any linux distro, I'm better setup to handle Ubuntu for this experiment

Then, install the latest version of docker-ce. At the time of this writing (January 7 2020) that is version 19.03. I had to make a modification to /etc/apt/sources.list to use the Ubuntu bionic/18.04 repo as there isn't a stable version built for 19.10. To do this change out 'eoan' with 'bionic' in the file:

Install Minikube in Local mode

  • Install the latest kubectl (1.17.0 for me): https://kubernetes.io/docs/tasks/tools/install-kubectl/
  • Download the latest Minikube (1.6.2 as of today): https://minikube.sigs.k8s.io/docs/start/linux/. Extract from the page:
    • curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \ && sudo install minikube-linux-amd64 /usr/local/bin/minikube
  • Run this command to start minikube: sudo minikube start --network-plugin=cni --vm-driver=none

    • Output from the command should look like something like this:

Install Cilium

  • Mount the BPF Filesystem (required for Cilium):

    • sudo mount bpffs -t bpf /sys/fs/bpf
  • sudo kubectl create -f https://raw.githubusercontent.com/cilium/cilium/1.6.5/install/kubernetes/quick-install.yaml

    • Output should look similar to this:

  • Validate that Cilium is up and running:

    • sudo kubectl -n kube-system get pods --watch
    • Ensure that the pods are 'running':

Additional configuration

Reference on Minikube/K8s settings: https://minikube.sigs.k8s.io/docs/reference/configuration/kubernetes/

You can adjust the kubernetes configurations in a couple ways. You can add these arguments when creating a minikube cluster:

  • --apiserver-ips 127.0.0.1 (to run minikube local only)
  • --apiserver-name localhost (to run minikube local only)
  • --extra-config=apiserver.enable-admission-plugins="PodSecurityPolicy" (to add PSPs)

Adjustments made here are taken when the Minikube restarts.

Minikube commands:

  • minikube start - this will start the cluster you have created above
  • minikube stop - stops the cluster
  • minikube addons enable ingress - enables an addon (ingress in this case)