Kubernetes notes

1 TODO Minikube

1.1 TODO Alternative container runtimes

minikube start \
    --network-plugin=cni \
    --container-runtime=containerd \
    --bootstrapper=kubeadm
# or …
minikube start \
  --network-plugin=cni \
    --extra-config=kubelet.container-runtime=remote \
    --extra-config=kubelet.container-runtime-endpoint=unix:///run/containerd/containerd.sock \
    --extra-config=kubelet.image-service-endpoint=unix:///run/containerd/containerd.sock \
    --bootstrapper=kubeadm
minikube start \
    --network-plugin=cni \
    --container-runtime=cri-o \
    --bootstrapper=kubeadm
# or …
minikube start \
    --network-plugin=cni \
    --extra-config=kubelet.container-runtime=remote \
    --extra-config=kubelet.container-runtime-endpoint=/var/run/crio.sock \
    --extra-config=kubelet.image-service-endpoint=/var/run/crio.sock \
    --bootstrapper=kubeadm

1.2 Cache some images

Depending on your workflow with minikube, you may re-create a VM from time to time (or quite a lot). In this case, you may want to speed the process up a bit.

First, you need a recent minikube version, a.k.a. v0.29.0 at least — adding image to cache with v0.28.1 is bugged and doesn’t work.

Then, it’s pretty simple and it works even if a minikube VM doesn’t work — in that case images will be loaded when doing a minikube start.

minikube cache add docker.io/library/ubuntu:18.04
# […]
minikube cache add docker.io/prom/statsd-export:v0.6.0

There is some shortcomings still, as for now, it’s not possible to download digest image.

Emacs 24.3.50.3 (Org mode 8.0.3)

Vincent Demeester. Last Updated 2019-04-12 Fri 17:50 (exported 2019-07-12 Fri 16:58).