In this video, we tackle a critical real-world scenario that frequently appears in Kubernetes interviews: what to do when the API server goes down. The Kubernetes API server is the central control plane component that handles all cluster operations via kubectl and internal components. If it fails, the entire cluster becomes unreachable.
Key troubleshooting steps:
- Check API server status – Use
systemctl status kube-apiserveror check the static pod manifest if running in a kubeadm cluster. - Inspect logs – Run
journalctl -u kube-apiserverto identify errors like certificate expiry, etcd connectivity issues, or resource exhaustion. - Verify etcd health – Since the API server relies on etcd, test with
etcdctl endpoint health. - Review configuration and certificates – Ensure that
--etcd-servers, TLS certificates, and service account keys are correct. - Check networking – Confirm that the API server port (6443 by default) is accessible and not blocked by firewall rules.
- Restart the API server – Use
systemctl restart kube-apiserveror delete the static pod to force a restart.
Real-world tip: In production, always have a backup of etcd snapshots and a recovery plan. Learn to use
kubectlwith alternative kubeconfigs or directly access the cluster via master nodes.
Watch the full video for a detailed walkthrough of this classic interview question.