Running Kubernetes without security hardening is like leaving your server room unlocked. This guide covers Pod Security Standards, RBAC, and Network Policies.
In Kubernetes 1.25 and above, apply the Restricted profile to every application namespace. This prevents privilege escalation, forces non-root users, and drops all Linux capabilities by default.
Set runAsNonRoot to true, runAsUser to 1000, allowPrivilegeEscalation to false, readOnlyRootFilesystem to true, and drop ALL capabilities. Without these your pod is rejected under the Restricted profile.
Never bind cluster-admin to application service accounts. Create one Role per service with only the verbs it needs — get, list, watch. Bind it with a RoleBinding scoped to one namespace only.
Start with a default-deny NetworkPolicy blocking all ingress and egress. Then whitelist only the specific ports and namespaces each service needs. This gives you zero-trust networking inside your cluster.