Interview Prep/Kubernetes/Control plane, RBAC, webhooks and autoscaling

`kubectl get pods` fails with `The connection to the server 10.0.0.10:6443 was refused - did you specify the right host or port?`.

BeginnerTroubleshootingControl plane, RBAC, webhooks and autoscaling
Answer

Likely causes → The API server is not listening: its static Pod crashed (bad flag, expired cert, etcd unreachable), the control-plane node is down, or your kubeconfig points to the wrong address. On a laptop, often a stale context to a deleted cluster.

Diagnose →

kubectl config current-context
# On the control-plane node
sudo crictl ps -a | grep kube-apiserver
sudo crictl logs $(sudo crictl ps -a --name kube-apiserver -q | head -1) 2>&1 | tail -30
sudo ss -lntp | grep 6443

Fix → Fix what the logs show: revert a bad edit in /etc/kubernetes/manifests/kube-apiserver.yaml, renew certificates, or restore etcd connectivity. The kubelet restarts the static Pod automatically.

Prevent → HA control plane behind a load balancer; back up manifests before editing; test flag changes on a non-prod cluster.

All Kubernetes questions Roadmap: Kubernetes networking, storage & scaling

More on Control plane, RBAC, webhooks and autoscaling