Zia Ur Rehman:
Hey Everyone, is anyone know why this error is coming?
sudo systemctl status kubelet
● kubelet.service - kubelet: The Kubernetes Node Agent
Loaded: loaded (/lib/systemd/system/kubelet.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/kubelet.service.d
└─10-kubeadm.conf
Active: activating (auto-restart) (Result: exit-code) since Tue 2023-02-07 08:21:22 UTC; 1s ago
Docs: <https://kubernetes.io/docs/home/>
Process: 3850 ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS (code=exited, status=1/FAILURE)
Main PID: 3850 (code=exited, status=1/FAILURE)
kubectl, kubelet and kubeadm version is v1.26.1
ubuntu 20.04
Zia Ur Rehman:
When i RUN journalctl -xu kubelet.service
-- Logs begin at Tue 2023-02-07 08:10:33 UTC, end at Tue 2023-02-07 08:31:06 UTC. --
Feb 07 08:19:59 k-master systemd[1]: Started kubelet: The Kubernetes Node Agent.
-- Subject: A start job for unit kubelet.service has finished successfully
-- Defined-By: systemd
-- Support: <http://www.ubuntu.com/support>
--
-- A start job for unit kubelet.service has finished successfully.
--
-- The job identifier is 2436.
Feb 07 08:20:00 k-master kubelet[3616]: E0207 08:20:00.042800 3616 run.go:74] "command failed" err="failed to validate kubelet flags: the container runtime endpoint address was not specified or empty, use --container-runtime-endpoint to set"
Feb 07 08:20:00 k-master systemd[1]: kubelet.service: Current command vanished from the unit file, execution of the command list won't be resumed.
Feb 07 08:20:00 k-master systemd[1]: kubelet.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: <http://www.ubuntu.com/support>
--
-- An ExecStart= process belonging to unit kubelet.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Feb 07 08:20:00 k-master systemd[1]: kubelet.service: Failed with result 'exit-code'.
Muhammad Furqan:
err="failed to validate kubelet flags: the container runtime endpoint address was not specified or empty, use --container-runtime-endpoint to set"
@Zia Ur Rehman check config file
Santosh Kaluskar:
Is this while setting up a new cluster? or a KK Lab?
Zia Ur Rehman:
Trying to setup on my GCP Virtual Machine
Zia Ur Rehman:
@Muhammad Furqan what need to be check in config.toml? it’s a big file
Santosh Kaluskar:
tried systemctl daemon-reload
the systemctl restart kubelet
?
Zia Ur Rehman:
@Santosh Kaluskar Yes. Tried by not working
Santosh Kaluskar:
Could this be an issue with swamp memory? Did you turn off the swap /etc/fstab
while installing the components? swapoff -a
Santosh Kaluskar:
whats the CRI you are using?
Zia Ur Rehman:
containerd
Zia Ur Rehman:
Although CNI is not installed yet
Zia Ur Rehman:
@Muhammad Furqan @Santosh Kaluskar Do we need to use this configuration or not?
Santosh Kaluskar:
absense of a cni plugin will keep the nodes in Not Ready
state. But here, nodes are not coming up. Initial settings like swap memory and cgrtoup drivers is an important step, then we need to proceed with installing the components.
I recommend looking at <https://thenewstack.io/how-to-deploy-kubernetes-with-kubeadm-and-containerd/|this blog> for the steps required for Kubeadm / containerd setup. Later you can choose you cni
Zia Ur Rehman:
Thanks, It’s fixed. I was checking the status of kubelet before kubadm init
Santosh Kaluskar:
For CNI I use https://kubernetes.io/docs/tasks/administer-cluster/network-policy-provider/cilium-network-policy/|Cilium, It has a very easy installation and has more advanced features. Just leave the minikube steps and install the binaries.