Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to initialize top level QOS containers: root container [kubepods] doesn't exist #483

Open
slapcat opened this issue Jun 10, 2024 · 2 comments

Comments

@slapcat
Copy link

slapcat commented Jun 10, 2024

Summary

Kubelet fails to start after bootstrap completes. The system journal shows the following error from the snap.k8s.kubelet.service unit:

kubelet.go:1547] "Failed to start ContainerManager" err="failed to initialize top level QOS containers: root container [kubepods] doesn't exist"

What Should Happen Instead?

Kubelet is configured correctly to start on the system.

Reproduction Steps

  1. sudo snap install k8s --channel=latest/edge --classic
  2. sudo k8s bootstrap
  3. sudo systemctl status snap.k8s.kubelet.service

System information

# cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy

Can you suggest a fix?

This issue might be related to the upstream bug here: cri-o/cri-o#7701

Adding these lines to the bottom of /var/snap/k8s/common/args/kubelet and restarting snap.k8s.kubelet.service fixes the issue:

--cgroups-per-qos=false
--enforce-node-allocatable=""

Are you interested in contributing with a fix?

No response

@neoaggelos
Copy link
Contributor

Hi @slapcat, thank you for bringing this up.

See canonical/microk8s#4361 (comment) for the related issue in MicroK8s. Though these args can help to work around the bug, in MicroK8s we went the route of adjusting the kubelet service so that the required cgroup controllers are properly delegated, see canonical/microk8s#4503

We will need to adjust that patch for k8s-snap as well.

@bschimke95
Copy link
Contributor

Hi @slapcat,

#550 should solve this issue.
Please try with the fix and close this issue if this works for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants