-
Notifications
You must be signed in to change notification settings - Fork 30
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 create cluster with [kubelet-start] WARNING: unable to start the kubelet service
#45
Comments
this does not happen with the following. (Ubuntu 20.04 , k8s v1.26.7) root@tomoyafujita:~# kubeadm version
kubeadm version: &version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.7", GitCommit:"84e1fc493a47446df2e155e70fca768d2653a398", GitTreeState:"clean", BuildDate:"2023-07-19T12:22:13Z", GoVersion:"go1.20.6", Compiler:"gc", Platform:"linux/amd64"}
root@tomoyafujita:~# kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
tomoyafujita Ready control-plane 9m19s v1.26.7 43.135.146.89 <none> Ubuntu 20.04.6 LTS 5.15.0-102-generic containerd://1.6.31 |
the same problem can be observed with Ubuntu 22.04 and k8s v1.26.15. the root cause is DNS limits, this hits the following error on kubelet service. (my guess is, both upgrading ubuntu 22.04 and k8s version affects this behavior, not gonna dig deeper for this.) root@edgemaster:/home/edgemaster/github.com/fujitatomoya/ros_k8s# systemctl status kubelet
Warning: The unit file, source configuration file or drop-ins of kubelet.service changed on disk. Run 'systemctl daemon-reload' t>
○ kubelet.service
Loaded: masked (Reason: Unit kubelet.service is masked.)
Drop-In: /etc/systemd/system/kubelet.service.d
└─10-kubeadm.conf
Active: inactive (dead) since Fri 2024-02-09 11:26:41 PST; 2 months 30 days ago
Main PID: 20882 (code=exited, status=0/SUCCESS)
CPU: 41.031s
Feb 09 11:25:02 edgemaster kubelet[20882]: E0209 11:25:02.547981 20882 dns.go:156] "Nameserver limits exceeded" err="Nameserver>
Feb 09 11:25:35 edgemaster kubelet[20882]: E0209 11:25:35.548358 20882 dns.go:156] "Nameserver limits exceeded" err="Nameserver>
Feb 09 11:25:54 edgemaster kubelet[20882]: E0209 11:25:54.549236 20882 dns.go:156] "Nameserver limits exceeded" err="Nameserver>
Feb 09 11:25:58 edgemaster kubelet[20882]: E0209 11:25:58.547797 20882 dns.go:156] "Nameserver limits exceeded" err="Nameserver>
Feb 09 11:26:04 edgemaster kubelet[20882]: E0209 11:26:04.547791 20882 dns.go:156] "Nameserver limits exceeded" err="Nameserver>
Feb 09 11:26:23 edgemaster kubelet[20882]: E0209 11:26:23.548518 20882 dns.go:156] "Nameserver limits exceeded" err="Nameserver>
Feb 09 11:26:41 edgemaster systemd[1]: Stopping kubelet: The Kubernetes Node Agent...
Feb 09 11:26:41 edgemaster systemd[1]: kubelet.service: Deactivated successfully.
Feb 09 11:26:41 edgemaster systemd[1]: Stopped kubelet: The Kubernetes Node Agent.
Feb 09 11:26:41 edgemaster systemd[1]: kubelet.service: Consumed 41.031s CPU time. the solution is, ### unmask the service if masked
root@edgemaster:~# systemctl unmask kubelet
Removed /etc/systemd/system/kubelet.service.
### configure kubelet to use static resolver file
root@edgemaster:~# cat /etc/default/kubelet
KUBELET_EXTRA_ARGS=--resolv-conf=/etc/resolv-static.conf
### create static resolver configuration for stability
root@edgemaster:~# cat /etc/resolv-static.conf
xxxx
### restart k8s api server
root@edgemaster:~# kubeadm init --pod-network-cidr=10.244.0.0/16 --cri-socket unix:///var/run/containerd/containerd.sock
I0510 10:43:15.825665 9150 version.go:256] remote version is much newer: v1.30.0; falling back to: stable-1.26
[init] Using Kubernetes version: v1.26.15
[preflight] Running pre-flight checks
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
root@edgemaster:~# kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
edgemaster Ready control-plane 22s v1.26.15 43.135.146.155 <none> Ubuntu 22.04.4 LTS 6.5.0-28-generic containerd://1.6.31 see also canonical/microk8s#3786 and https://kubernetes.io/docs/tasks/administer-cluster/dns-debugging-resolution/#known-issues |
closing in favor of #48 |
Just happened to see this error. either primary or worker, this can be observed as stopper for cluster creation.
The text was updated successfully, but these errors were encountered: