That is what kubectl security review is about—finding those mistakes before someone else does. If you run clusters, you already know kubectl is powerful, maybe too powerful. The same command-line tool that lets you deploy the future also lets you delete it in seconds. Security gaps hide in plain sight: a sloppy RBAC policy, credentials baked into configs, namespaces with no guardrails.
A proper kubectl security review starts by locking down the basics. Audit kubeconfig files. Remove unused contexts. Scan for wide-open permissions. Check who can run kubectl exec because that’s often a direct shell into production containers. Restrict kubectl port-forward unless there’s a strong reason. Rotate service account tokens and check for lingering secrets in kubectl get secrets -o yaml.
Next, enforce the principle of least privilege. Make sure every kubeconfig in use belongs to a named user with the smallest set of permissions they need. Review Roles and ClusterRoles. Cross-reference with RoleBindings and ClusterRoleBindings. Block group accounts with admin-level access. Apply Kubernetes audit logging and review it—logs tell you when someone used kubectl in ways you didn’t expect.