docker change cgroup driver to systemd
Since I have two configuration file I need to add the entry in the second config file also -- /etc/systemd/system/docker.service.d/docker-thinpool.conf
:
--exec-opt native.cgroupdriver=systemd \
Kubelet service is not running. It seems like the kubelet isn't running or healthy
First, check if swap is diabled on your node as you MUST disable swap in order for the kubelet to work properly.
sudo swapoff -a
sudo sed -i '/ swap / s/^/#/' /etc/fstab
Also check out if kubernetes and docker cgroup driver is set to same.
From kubernetes documentation:
Both the container runtime and the kubelet have a property called "cgroup driver", which is important for the management of cgroups on Linux machines.
Warning:
Matching the container runtime and kubelet cgroup drivers is required or otherwise the kubelet process will fail.
The Container runtimes page explains that the systemd driver is recommended for kubeadm based setups instead of the cgroupfs driver, because kubeadm manages the kubelet as a systemd service.
For docker:
docker info |grep -i cgroup
You can add this to /etc/docker/daemon.json
to set the docker cgroup driver to systemd:
{
"exec-opts": ["native.cgroupdriver=systemd"]
}
Restart your docker service after making any changes with
sudo systemctl daemon-reload
sudo systemctl restart docker
sudo systemctl restart kubelet
You can try to execute kubeadm join
after performing the above steps.
Cluster install with `kubeadm` on Ubuntu. Failing on `kubeadm init` with `getsockopt: connection refused`
My system needed
cat << EOF > /etc/docker/daemon.json
{
"exec-opts": ["native.cgroupdriver=cgroupfs"]
}
EOF
Related Topics
Insert New Line to Bash Prompts
Splitting Gzipped Logfiles Without Storing the Ungzipped Splits on Disk
Execute Command Line and Return Command Output
Best Posix Way to Determine If a Filesystem Is Mounted Read Only
Boost with Qt Creator and Linux
Makefile with Multiple Targets
Bash: Best Architecture for Reading from Two Input Streams
How to Detect Usb Drive Insertion in Linux
Best Way to Set Environment Variables in Calling Shell
How to Use Stdin Twice from Pipe
Qt Creator: Add Qt Module to Project
Ftdi D2Xx Conflict with Ftdi_Sio on Linux - How to Remove Ftdi_Sio Automatically
How Do Linux File Descriptor Limits Work
Recursively Find All Files Newer Than a Given Time