Skip to content

Instantly share code, notes, and snippets.

@markruler
Last active December 11, 2020 07:06
Show Gist options
  • Save markruler/025b6a3eb5bddaae9cb0cc6e26936403 to your computer and use it in GitHub Desktop.
Save markruler/025b6a3eb5bddaae9cb0cc6e26936403 to your computer and use it in GitHub Desktop.
containerd on Minikube

containerd on Minikube

Install

https://minikube.sigs.k8s.io/docs/start/

  • MacOS
# If the Brew Package Manager installed:

brew install minikube
# If which minikube fails after installation via brew, you may have to remove the minikube cask and link the binary:

brew cask remove minikube
brew link minikube

Getting Started

Upgrade minikube version

# https://docs.cilium.io/en/stable/gettingstarted/minikube/
# `--cni` flag only available for minikube >= v1.12.1
brew list minikube
brew info minikube
brew upgrade minikube
minikube version

# https://minikube.sigs.k8s.io/docs/commands/start/
minikube start \
--cpus=2 \
--memory=2g \
--disk-size=20g \
--driver=hyperkit \
--container-runtime=containerd \
--nodes=2 \
--bootstrapper=kubeadm \
--kubernetes-version=stable \
--network-plugin=cni \
--cni=calico \ # cilium, bridge, flannel
--alsologtostderr

# https://minikube.sigs.k8s.io/docs/drivers/
# linux: kvm2, none
# mac: hyperkit
# windows: hyperv

# cilium
# https://docs.cilium.io/en/stable/gettingstarted/minikube/

kubectl

# https://minikube.sigs.k8s.io/docs/handbook/kubectl/
minikube kubectl -- <kubectl commands>

# You can also alias kubectl="minikube kubectl --" for easier usage.
# Alternatively, you can create a symbolic link to minikube’s binary named ‘kubectl’.
ln -s $(which minikube) /usr/local/bin/kubectl

kubectl version

which kubectl
# /usr/local/bin/kubectl

Check CNI, CRI

minikube ssh
whoami
# docker

su
whoami
# root

cat /etc/cni/net.d/k8s.conf
ls -hal /opt/cni/bin/

systemctl status containerd

Clean

minikube delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment