Just simple add these lines into file /etc/containerd/config.toml:
...
...
...
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.kata]
runtime_type = "io.containerd.kata.v2"
...
...
...
Download and untar Kata Containers to root path “/”
$ ls -l /opt/kata
total 44
drwxr-xr-x 2 root root 4096 Sep 19 20:31 bin
drwxr-xr-x 2 root root 4096 Aug 16 01:52 include
drwxr-xr-x 4 root root 4096 Aug 16 01:52 lib
drwxr-xr-x 2 root root 4096 Aug 9 17:45 libexec
drwxr-xr-x 3 root root 4096 Sep 19 20:36 runtime-rs
drwxr-xr-x 8 root root 4096 Sep 19 20:36 share
-rw-r--r-- 1 root root 29 Sep 19 21:28 VERSION
-rw-r--r-- 1 root root 13702 Sep 19 21:28 versions.yaml
And make this link file:
$ sudo ln -s /opt/kata/bin/containerd-shim-kata-v2 /usr/local/bin/containerd-shim-kata-v2
Restart containerd and apply this RuntimeClass
apiVersion: node.k8s.io/v1
handler: kata
kind: RuntimeClass
metadata:
name: kata
Create deployment with “runtimeClassName: kata”
Result:
$ k describe pod kata-7fc5b44bf5-nv8ln
Name: kata-7fc5b44bf5-nv8ln
Namespace: default
Priority: 0
Runtime Class Name: kata
Service Account: default
...
...
...
That is all.