Why Kubernetes matters for compliance
Kubernetes adds its own layer of access control and isolation on top of your cloud account. A ClusterRoleBinding that hands cluster-admin to a broad group, a privileged container, or a namespace with no NetworkPolicy can undo the controls you set at the cloud level. Auditors reviewing containerized workloads increasingly ask for cluster-level evidence, not just cloud console screenshots.
Varman connects to the cluster API with a read-only service account and checks four things: no cluster-admin bindings to anonymous or everyone-style subjects (critical severity), Pod Security admission enforced at baseline or restricted in non-system namespaces, no privileged or root containers in running pods, and at least one NetworkPolicy per non-system namespace. These feed the Role-based Access Controls and Production Firewall and No-Public-Access tasks for SOC 2, ISO 27001, HIPAA, PCI DSS, and NIST.
Kubernetes checks in Varman
Monitor Kubernetes cluster security: RBAC least privilege, Pod Security Standards, privileged workloads, and network policies. Varman runs 4 checks against Kubernetes on a schedule and records each result as evidence.
RBAC Least Privilege
critical severityVerify that no ClusterRoleBinding grants cluster-admin to anonymous, everyone groups, or other broad subjects.
- Fails when
- Over-privileged cluster-admin binding "
- How to fix
- Edit the Kubernetes connection and provide the cluster API server URL.
- Ensure the service account token can read clusterrolebindings (rbac.authorization.k8s.io) and that the API server URL and CA certificate are correct.
Evidence for the Role-based Access Controls task. Used by CMMC L2, HIPAA, ISO 27001, ISO 42001, NIS 2, NIST 800-171, NIST CSF, PCI DSS, SOC 2.
Pod Security Standards Enforced
high severityVerify that non-system namespaces enforce Pod Security admission (baseline or restricted).
- Fails when
- Namespace "
- How to fix
- Edit the Kubernetes connection and provide the cluster API server URL.
- Ensure the service account token can list namespaces and that the API server URL and CA certificate are correct.
Evidence for the Production Firewall & No-Public-Access Controls task. Used by CMMC L2, HIPAA, ISO 27001, ISO 42001, NIS 2, NIST 800-171, NIST CSF, PCI DSS, SOC 2.
No Privileged Containers
high severityVerify that running pods are not privileged and are configured to run as a non-root user.
- Fails when
- Privileged container(s) in pod
- How to fix
- Edit the Kubernetes connection and provide the cluster API server URL.
- Ensure the service account token can list pods and that the API server URL and CA certificate are correct.
- Remove "securityContext.privileged: true" from the container spec. Grant only the specific Linux capabilities the workload needs.
- Set "securityContext.runAsNonRoot: true" (and a non-zero runAsUser) at the pod or container level.
Evidence for the Production Firewall & No-Public-Access Controls task. Used by CMMC L2, HIPAA, ISO 27001, ISO 42001, NIS 2, NIST 800-171, NIST CSF, PCI DSS, SOC 2.
Network Policies Present
medium severityVerify that each non-system namespace has at least one NetworkPolicy.
- Fails when
- Namespace "
- How to fix
- Edit the Kubernetes connection and provide the cluster API server URL.
- Ensure the service account token can list namespaces and networkpolicies (networking.k8s.io) and that the API server URL and CA certificate are correct.
Evidence for the Production Firewall & No-Public-Access Controls task. Used by CMMC L2, HIPAA, ISO 27001, ISO 42001, NIS 2, NIST 800-171, NIST CSF, PCI DSS, SOC 2.
Frameworks Kubernetes evidence supports
In Varman, each check feeds an evidence task, and each task is mapped to requirements in the frameworks you run. Results from Kubernetes count toward these 9 frameworks.
Connecting Kubernetes
An admin adds the details below in Varman under Integrations. Secret values are encrypted before they are stored.
- API Server URL
- The cluster API server endpoint (kubectl config view -o jsonpath="{.clusters[0].cluster.server}").
- Service Account Token
- A bearer token for a read-only ServiceAccount (ClusterRole with get/list on the audited resources).
- CA Certificate (PEM)
- PEM-encoded cluster CA certificate. Required for managed clusters (EKS/AKS/GKE) and any self-signed API server: paste the certificate-authority-data from your kubeconfig (base64-decoded). The runner trusts this CA for the connection.
- Skip TLS verification
- Set to "true" to skip API-server certificate verification. Lab/testing only: prefer providing the CA certificate above.
Kubernetes questions, answered.
What access does Varman need to Kubernetes?
The API server URL, a bearer token for a read-only ServiceAccount bound to a ClusterRole with get and list on the audited resources, and the cluster CA certificate in PEM form. The CA is required for EKS, AKS, GKE, and any self-signed API server.
Should I skip TLS verification?
Only in a lab. There is an option to skip API server certificate verification, but providing the CA certificate from your kubeconfig (base64-decoded) is the right setup for production clusters.
How do I pass the Pod Security Standards check?
Label each non-system namespace to enforce the baseline or restricted Pod Security Standard with the built-in Pod Security admission controller. Namespaces with no enforcement label fail.
How often are Kubernetes checks run?
On a schedule, cluster by cluster. Re-run them on demand after removing a privileged container or adding a NetworkPolicy.