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

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

This guide includes

Use this when auditing a cluster and you get one place to start. This matters because the API server is the only way in, so its flags are the cluster's security posture - and a flag that is absent matters as much as the ones that are present.

Before you start

  1. What the manifest says

  2. The flag that is not there

Official sources