examples icon indicating copy to clipboard operation
examples copied to clipboard

New code/example required for Minikube 1.24+ because of switch to cri-dockerd & cni

Open jimlindeman opened this issue 3 years ago • 1 comments

Using minikube versions 1.24 and later on Travis requires additional steps like:

  1. downloading/installing a recent go compiler (like 1.19)
  2. downloading/compiling/installing latest containerd-cni from https://raw.githubusercontent.com/containerd/containerd/
  3. downloading/compiling/installing latest cri-dockerd from https://github.com/Mirantis/cri-dockerd.git
  4. installing latest crictl from https://github.com/kubernetes-sigs/cri-tools/

It took me 10+ hours to figure the right combination of steps to make containers start up. However, the container-cni library, while recognized by minikube, doesn't seem to actually configure the networking correctly in minikube because the pods are not able to talk to the outside internet (i.e. the containers still seem to be on host/null networks under docker0 instead of on the cni0 bridge created by containerd-cni).

Once we get this figured out, for long term I really think this makes sense to have these pieces be offered pre-installed by Travis similar to what it does for:

services:
 - docker

jimlindeman avatar Nov 10 '22 21:11 jimlindeman

Actually, finding out that with just steps of:

  1. downloading/installing a recent go compiler (like 1.19)
  2. downloading/compiling/installing latest cri-dockerd from https://github.com/Mirantis/cri-dockerd.git
  3. installing latest crictl from https://github.com/kubernetes-sigs/cri-tools/ and creating /etc/crictl.yaml like:
runtime-endpoint: unix:///var/run/cri-dockerd.sock
image-endpoint: unix:///var/run/cri-dockerd.sock
timeout: 2
debug: false

Then I'm able to start minikube without sudo using the docker driver like:

minikube start --profile=minikube --vm-driver=docker --bootstrapper=kubeadm --kubernetes-version=v${MINIKUBE_K8S_VERSION:-1.24.3} --extra-config kubeadm.ignore-preflight-errors=SystemVerification --disk-size 50GB --memory 8192

The created pods have external network connectivity (ping outside world fine), but I am hitting a MTU mismatch issue like https://github.com/gliderlabs/docker-alpine/issues/307 . Once I get that figured out I can make a PR to replace the current .travis.yml here.

jimlindeman avatar Nov 17 '22 15:11 jimlindeman