Pcornel
Containers · Kubernetes Architecture

kube-apiserver

Cheat sheet · https://pcornel.dk/topic.php?topic=6140

Back to the Topic

Answer

kube-apiserver is the front door of Kubernetes: it authenticates, authorises (RBAC), runs admission controllers, validates objects and stores them in etcd.

Remember

401 → authentication; 403 → RBAC (kubectl auth can-i); admission webhooks can reject or slow requests. Check /readyz.

First checks

  • kubectl get --raw='/readyz?verbose' — first check for this topic
  • kubectl get pods -o wide — pods, status, node, IP
  • kubectl describe pod <pod> — events and conditions
  • kubectl logs <pod> [-c <c>] [--previous] — container logs (incl. previous crash)
  • kubectl get events --sort-by=.lastTimestamp — recent cluster events

Commands

kubectl get validatingwebhookconfigurations,mutatingwebhookconfigurations
kubectl
kubectl get flowschemas,prioritylevelconfigurations

Verify in this order

client → authn → authz (RBAC) → admission → validation → etcd

Where it usually breaks

A failing admission webhook can block all creates of a resource type.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6140

Confirmation

Confirm action

Continue?