CertGrid CertGrid
Hands-on Lab·Kubernetes and Cloud Native Security Associate

kube-apiserver Security Flags

The apiserver is the only way into the cluster, so its flags are the cluster's security posture. This guide reads them off the manifest and then tests one of them from outside with no credential at all - which reveals a default that is not in the file.

Cluster Component Security Guide 10 of 42 Intermediate

Written against the versions above. kubeadm's defaults for v1.36. `--authorization-mode=Node,RBAC` and `--enable-admission-plugins=NodeRestriction` are what kubeadm sets; a flag absent from the manifest means the apiserver's own default applies, and that is the trap this page is about.

The cka5001 cluster: one control plane and 3 schedulable workers, on Cilium.
Server NameIP AddressOSRolesCPURAMHDD
CKA5001192.168.0.41Ubuntu 26.04 LTSControl Plane Node (tainted NoSchedule)2 Core4 GB50 GB
CKA5001-NODE01192.168.0.42Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA5001-NODE02192.168.0.43Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA5001-NODE03192.168.0.44Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB

Before you start

  1. What the manifest says

  2. The flag that is not there

Official sources