Microk8s comes with default containerd and its configurations could not find my Kata run time class #2110
Replies: 5 comments 8 replies
-
can you describe the runtimeclass ( |
Beta Was this translation helpful? Give feedback.
-
The main issue is with containerd configuration file, and I am pretty sure about it too. it's tough to understand in which containerd configuration file we need to configure the kata run time, 1. should I dump the default to /etc/containerd/config.toml then restart the microk8s cluster
But both tried as well, and still could not detect the Kata run time :( |
Beta Was this translation helpful? Give feedback.
-
thats the main issue here , but you can see from the status command, the last line which says about the snap location where the contained toml is loaded...here I have added the Kata. and restarted the daemon but no use.
|
Beta Was this translation helpful? Give feedback.
-
Basically the the snap has two folder under microk8s
I have added the kata templated in both folder 2262 and current |
Beta Was this translation helpful? Give feedback.
-
I gave this a try because I wanted to try out microk8s. I ran into the same issue as you when following your instructions. I was able to get this to work with one small change. Change the metadata name from
|
Beta Was this translation helpful? Give feedback.
-
I am trying Kata with Microkubernetes which is installed via
sudo snap install microk8s --classic
but microk8s comes with default containerd which causes configuration issues for me always. Please suggest any better alternatives.I will share all the steps followed in this
Since Containerd comes with Microk8s by default, the following command will show the containerd status
sudo systemctl status snap.microk8s.daemon-containerd.service
from the above command , I could see that the configuration file location which containerd uses which will be something like
/var/snap/microk8s/2264/args/containerd.toml
Note: Since containerd status shows the configuration path as
/var/snap/microk8s/2264/args/containerd.toml
I will add my Kata runtimes in this file.Now I will install Kata
then make these changes to reflect in
/etc/kata-containers/configuration.toml
Now creating the symlink
Now I will create a Kata run time class kata-runtime.yaml
then
kubectl apply -f kata-runtime.yaml
to create a Kata run timeAfter this I will have runtime class of Kata
Now restarting microk8s daemon to reflect everything
Result:
By doing all the above mentioned steps, I will be able to run
microk8s ctr run --runtime io.containerd.run.kata.v2 -t --rm docker.io/library/busybox:latest hello sh
with kata run time.But if I run a pod with above created Kata runtime class I will end up with
Error from server (Forbidden): error when creating "nginx-kata.yaml": pods "nginx-kata" is forbidden: pod rejected: RuntimeClass "kata" not found
such errors.So please suggest, what is the right way or which steps I am missing in between. This happens with microk8s yaml deployment /pods only but as I mentioned the
microk8s ctr run --runtime io.containerd.run.kata.v2 -t --rm docker.io/library/busybox:latest hello sh
always works.Beta Was this translation helpful? Give feedback.
All reactions