Quick guide for getting Kata+containerd (using v2 shim) up and running super quick on bionic
Use the following sh:
sudo bash -c "cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial-unstable main
EOF"
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo -E apt update
sudo -E apt install -y kubelet kubeadm kubectl
VERSION="1.2.5"
echo "Install Containerd ${VERSION}"
wget -q https://storage.googleapis.com/cri-containerd-release/cri-containerd-${VERSION}.linux-amd64.tar.gz
sudo tar -C / -xzf cri-containerd-${VERSION}.linux-amd64.tar.gz
sudo systemctl start containerd
sudo swapoff -a
sudo modprobe br_netfilter
git clone https://github.com/clearlinux/cloud-native-setup.git
Update to use containerd instead of CRIO, and make minimal more minimal
cd cloud-native-setup
wget https://gist.githubusercontent.com/egernst/138def9599a42376f409fbce2e95de5d/raw/9e1b952b75f92fc125f65a068563f0286e159f60/z0001-Use-containerd-and-let-me-configure-Kata.patch
git am z0001-Use-containerd-and-let-me-configure-Kata.patch
pushd cloud-native-setup/cl-k8s-examples
./create-stack.sh minimal
Use kata deploy, and register the runtimeclass, kata
:
kubectl apply -f https://raw.githubusercontent.com/kata-containers/packaging/master/kata-deploy/kata-rbac.yaml
kubectl apply -f https://raw.githubusercontent.com/kata-containers/packaging/master/kata-deploy/kata-deploy.yaml
kubectl apply -f https://raw.githubusercontent.com/clearlinux/cloud-native-setup/master/clr-k8s-examples/8-kata/kata-qemu-runtimeClass.yaml
Here's a simple example pod. Of not is the runtimeClass definition
kubectl apply -f https://gist.githubusercontent.com/egernst/9cbbb3d6ba566afca98be2a4e29328d6/raw/0f6e332ba1b7306ed895e5ff91b2939ca3f0bb42/two-pod.yaml