Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kubeadm issue
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
leonchik1976
Guru
Guru


Joined: 24 Jan 2010
Posts: 325

PostPosted: Sun Jul 09, 2023 6:21 am    Post subject: kubeadm issue Reply with quote

hi, trying to bootstrap kubernetes cluster with kubeadm and got following errors, though kubelet seems running and no crashed components found. Anyone faced such issue?




[etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests"
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
[kubelet-check] Initial timeout of 40s passed.

Unfortunately, an error has occurred:
timed out waiting for the condition

This error is likely caused by:
- The kubelet is not running
- The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)

If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
- 'systemctl status kubelet'
- 'journalctl -xeu kubelet'

Additionally, a control plane component may have crashed or exited when started by the container runtime.
To troubleshoot, list all containers using your preferred container runtimes CLI.
Here is one example how you may list all running Kubernetes containers by using crictl:
- 'crictl --runtime-endpoint unix:///var/run/containerd/containerd.sock ps -a | grep kube | grep -v pause'
Once you have found the failing container, you can inspect its logs with:
- 'crictl --runtime-endpoint unix:///var/run/containerd/containerd.sock logs CONTAINERID'
error execution phase wait-control-plane: couldn't initialize a Kubernetes cluster
To see the stack trace of this error execute with --v=5 or higher
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Sun Jul 09, 2023 10:16 am    Post subject: Reply with quote

How many nodes are you using?
Have you installed docker kubeadm kubelet and kubectl in all nodes?
Is kubelet running and enabled in all nodes?
Did you initialize the control plane in master node?
Something like
Code:

kubeadm init --apiserver-advertise-address=<ip-of-master-node>

?
_________________
:)


Last edited by alamahant on Sun Jul 09, 2023 10:24 am; edited 1 time in total
Back to top
View user's profile Send private message
leonchik1976
Guru
Guru


Joined: 24 Jan 2010
Posts: 325

PostPosted: Sun Jul 09, 2023 10:17 am    Post subject: Reply with quote

alamahant wrote:
How many nodes are you using?
Have you installed docker kubeadm kubelet and kubectl in all nodes?
Did you initialize the control plane in master node?
Something like
Code:

kubeadm init --apiserver-advertise-address=<ip-of-master-node>

?


all prerequisites installed (docker, kubeadm, kubelet....)
the error is on kubeadm init command
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Sun Jul 09, 2023 10:25 am    Post subject: Reply with quote

Is kubelet running and enabled in all nodes?
Do you have a properly configured kernel for networking?
What does
Code:

journalctl -xeu kubelet

say?
_________________
:)
Back to top
View user's profile Send private message
leonchik1976
Guru
Guru


Joined: 24 Jan 2010
Posts: 325

PostPosted: Sun Jul 09, 2023 10:27 am    Post subject: Reply with quote

alamahant wrote:
Is kubelet running and enabled in all nodes?
Do you have a properly configured kernel for networking?


kubelet running and enabled in all nodes - what do you mean? control plane still not exists
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Sun Jul 09, 2023 10:37 am    Post subject: Reply with quote

Plz check relevant logs for kubelet.
Also check cgroups.
Swap between unified and hybrid and see what works.
A reboot is necessary.
Also plz check if using the binary kernel helps.In which case your kernel may lack config.
Also plz run "kubeadm init" as root.
Additionally turn swap off
Code:

swapoff /dev/<my-swap>

as in my case is seen in
Code:

cat /var/log/kubelet/kubelet.log
I0709 13:44:18.121792   11095 server.go:415] "Kubelet version" kubeletVersion="v1.27.3"
I0709 13:44:18.121865   11095 server.go:417] "Golang settings" GOGC="" GOMAXPROCS="" GOTRACEBACK=""
I0709 13:44:18.122099   11095 server.go:578] "Standalone mode, no API client"
I0709 13:44:18.126540   11095 server.go:466] "No api server defined - no events will be sent to API server"
I0709 13:44:18.126561   11095 server.go:662] "--cgroups-per-qos enabled, but --cgroup-root was not specified.  defaulting to /"
E0709 13:44:18.126765   11095 run.go:74] "command failed" err="failed to run Kubelet: running with swap on is not supported, please disable swap! or set --fail-swap-on flag to false. /proc/swaps contained: [Filename\t\t\t\tType\t\tSize\t\tUsed\t\tPriority /dev/dm-1                               partition\t16777212\t0\t\t-2]"
I0709 13:46:22.480473    4171 server.go:415] "Kubelet version" kubeletVersion="v1.27.3"
I0709 13:46:22.480712    4171 server.go:417] "Golang settings" GOGC="" GOMAXPROCS="" GOTRACEBACK=""
I0709 13:46:22.481421    4171 server.go:578] "Standalone mode, no API client"
I0709 13:46:22.487890    4171 server.go:466] "No api server defined - no events will be sent to API server"
I0709 13:46:22.487910    4171 server.go:662] "--cgroups-per-qos enabled, but --cgroup-root was not specified.  defaulting to /"
E0709 13:46:22.488737    4171 run.go:74] "command failed" err="failed to run Kubelet: running with swap on is not supported, please disable swap! or set --fail-swap-on flag to false. /proc/swaps contained: [Filename\t\t\t\tType\t\tSize\t\tUsed\t\tPriority /dev/dm-1                               partition\t16777212\t0\t\t-2]"


NOTE:Ok when swapping off kubelet starts just fine.
_________________
:)
Back to top
View user's profile Send private message
leonchik1976
Guru
Guru


Joined: 24 Jan 2010
Posts: 325

PostPosted: Mon Jul 10, 2023 5:34 pm    Post subject: Reply with quote

alamahant wrote:
Plz check relevant logs for kubelet.
Also check cgroups.
Swap between unified and hybrid and see what works.
A reboot is necessary.
Also plz check if using the binary kernel helps.In which case your kernel may lack config.
Also plz run "kubeadm init" as root.
Additionally turn swap off
Code:

swapoff /dev/<my-swap>

as in my case is seen in
Code:

cat /var/log/kubelet/kubelet.log
I0709 13:44:18.121792   11095 server.go:415] "Kubelet version" kubeletVersion="v1.27.3"
I0709 13:44:18.121865   11095 server.go:417] "Golang settings" GOGC="" GOMAXPROCS="" GOTRACEBACK=""
I0709 13:44:18.122099   11095 server.go:578] "Standalone mode, no API client"
I0709 13:44:18.126540   11095 server.go:466] "No api server defined - no events will be sent to API server"
I0709 13:44:18.126561   11095 server.go:662] "--cgroups-per-qos enabled, but --cgroup-root was not specified.  defaulting to /"
E0709 13:44:18.126765   11095 run.go:74] "command failed" err="failed to run Kubelet: running with swap on is not supported, please disable swap! or set --fail-swap-on flag to false. /proc/swaps contained: [Filename\t\t\t\tType\t\tSize\t\tUsed\t\tPriority /dev/dm-1                               partition\t16777212\t0\t\t-2]"
I0709 13:46:22.480473    4171 server.go:415] "Kubelet version" kubeletVersion="v1.27.3"
I0709 13:46:22.480712    4171 server.go:417] "Golang settings" GOGC="" GOMAXPROCS="" GOTRACEBACK=""
I0709 13:46:22.481421    4171 server.go:578] "Standalone mode, no API client"
I0709 13:46:22.487890    4171 server.go:466] "No api server defined - no events will be sent to API server"
I0709 13:46:22.487910    4171 server.go:662] "--cgroups-per-qos enabled, but --cgroup-root was not specified.  defaulting to /"
E0709 13:46:22.488737    4171 run.go:74] "command failed" err="failed to run Kubelet: running with swap on is not supported, please disable swap! or set --fail-swap-on flag to false. /proc/swaps contained: [Filename\t\t\t\tType\t\tSize\t\tUsed\t\tPriority /dev/dm-1                               partition\t16777212\t0\t\t-2]"


NOTE:Ok when swapping off kubelet starts just fine.


swap not exists at all, and kubeadm init of course i run as root. only binary kernel still didn't tried
Back to top
View user's profile Send private message
leonchik1976
Guru
Guru


Joined: 24 Jan 2010
Posts: 325

PostPosted: Mon Jul 10, 2023 7:49 pm    Post subject: Reply with quote

i couldn't make dist kernel to boot in any way, but all pre-flight checks passes. anyway, i think i will give it up, because on another distribution the same works without any issues
Back to top
View user's profile Send private message
leonchik1976
Guru
Guru


Joined: 24 Jan 2010
Posts: 325

PostPosted: Tue Jul 11, 2023 5:03 pm    Post subject: Reply with quote

Solution from: https://forums.gentoo.org/viewtopic-t-1111252-start-0.html
solved the issue
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum