I have setup K8S on fedora 37, following a
Kubeadmi init
seems images are pulled and things seemed correct. However, when I try
Kubectl cluster-info
0406 11:58:52.440579 704658 memcache.go:265] couldn't get current server API group list: Get "https://192.168.1.48:6443/api?timeout=32s": dial tcp 192.168.1.48:6443: connect: connection refused E0406 11:58:52.441106 704658 memcache.go:265] couldn't get current server API group list: Get "https://192.168.1.48:6443/api?timeout=32s": dial tcp 192.168.1.48:6443: connect: connection refused E0406 11:58:52.442602 704658 memcache.go:265] couldn't get current server API group list: Get "https://192.168.1.48:6443/api?timeout=32s": dial tcp 192.168.1.48:6443: connect: connection refused E0406 11:58:52.444035 704658 memcache.go:265] couldn't get current server API group list: Get "https://192.168.1.48:6443/api?timeout=32s": dial tcp 192.168.1.48:6443: connect: connection refused E0406 11:58:52.445543 704658 memcache.go:265] couldn't get current server API group list: Get "https://192.168.1.48:6443/api?timeout=32s": dial tcp 192.168.1.48:6443: connect: connection refused
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
after digging, I discovered thet kubelet service is not running, when I check its status I see
Process: 662008 ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS
$KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS
(code=exited, status=1/FAILURE) Main PID: 662008 (code=exited,
status=1/FAILURE)
I issue the command
sudo journalctl -xeu kubelet
I find some strange indication regarding swapp
Apr 06 11:46:05 puppetmaster29 kubelet[604092]: I0406 11:46:05.929992
604092 server.go:198] "--pod-infra-container-image will not be pruned
by the image garbage collector in kubelet and should> Apr 06 11:46:05
puppetmaster29 kubelet[604092]: Flag --pod-infra-container-image has
been deprecated, will be removed in 1.27. Image garbage collector will
get sandbox image information from CR> Apr 06 11:46:05 puppetmaster29
kubelet[604092]: I0406 11:46:05.959288 604092 server.go:412] "Kubelet
version" kubeletVersion="v1.26.3" Apr 06 11:46:05 puppetmaster29
kubelet[604092]: I0406 11:46:05.959563 604092 server.go:414] "Golang
settings" GOGC="" GOMAXPROCS="" GOTRACEBACK="" Apr 06 11:46:05
puppetmaster29 kubelet[604092]: I0406 11:46:05.960072 604092
server.go:836] "Client rotation is on, will bootstrap in background"
Apr 06 11:46:05 puppetmaster29 kubelet[604092]: I0406 11:46:05.962910
604092 certificate_store.go:130] Loading cert/key pair from
"/var/lib/kubelet/pki/kubelet-client-current.pem". Apr 06 11:46:05
puppetmaster29 kubelet[604092]: I0406 11:46:05.964710 604092
dynamic_cafile_content.go:157] "Starting controller"
name="client-ca-bundle::/etc/kubernetes/pki/ca.crt" Apr 06 11:46:05
puppetmaster29 kubelet[604092]: I0406 11:46:05.972921 604092
server.go:659] "--cgroups-per-qos enabled, but --cgroup-root was not
specified. defaulting to /" Apr 06 11:46:05 puppetmaster29
kubelet[604092]: E0406 11:46:05.973293 604092 run.go:74] "command
failed" err="failed to run Kubelet: running with swap on is not
supported, please disable swap!> Apr 06 11:46:05 puppetmaster29
systemd[1]: kubelet.service: Main process exited, code=exited,
status=1/FAILURE ░░ Subject: Unit process exited ░░ Defined-By:
systemd ░░ Support:
https://lists.freedesktop.org/mailman/listinfo/systemd-devel ░░ ░░ An
ExecStart= process belonging to unit kubelet.service has exited. ░░ ░░
The process' exit code is 'exited' and its exit status is 1.
I have executed
sudo swappoff -a
a couple of times and even commented it inside the fstab file as follows
/dev/mapper/fedora-root / xfs defaults 0 0
UUID=50a98c60-a467-4c60-9fcb-e394c74043a7 /boot ext4 defaults 1 2
# /dev/mapper/fedora-swap swap swap defaults 0 0
So not really know what to do or how to solve this, thanks for your help