I am diving into K8s and deployed my first pod via kubectl apply
on the master node. In order to check its status, I called kubectl get pods
twice in a row. I did not touch anything, but a subsequent call of the same command failed with the error below. Can anyone help me understand what may have happened?
ubuntu:~$ kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx 0/1 Pending 0 18s
ubuntu:~$ kubectl get pods
The connection to the server xxx.xxx.xxx.xxx:6443 was refused - did you specify the right host or port?
For completion, here the status of kubelet.service
on the master node:
● 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: active (running) since Thu 2023-04-20 02:12:52 UTC; 23min ago
Thanks for any hint.