Kubernetes penetration testing across control plane and runtime
Kubernetes penetration testing evaluates what a named user, service account, workload, or node can reach and change inside a cluster. The useful result connects API permissions, workload identity, network policy, admission controls, and runtime access to a concrete security impact.
Test Kubernetes from controlled identities and namespaces, compare RBAC and admission policy with observed API actions, validate workload and network boundaries, preserve API-server and audit evidence, and retest the exact path after remediation.

What is Kubernetes penetration testing?
Kubernetes penetration testing is an authorized assessment of the cluster attack surface from defined identities and starting points. It examines the API server, RBAC, service accounts, workloads, network policy, Secrets, admission controls, nodes, and connected cloud services.
A cluster can appear isolated while a service account token, mounted secret, privileged workload, or cross-namespace role grants access to assets outside the intended boundary. A useful test proves what a concrete identity can do rather than only listing potentially risky configuration.
Kubernetes security is not limited to container escape. Misconfigured permissions, broad impersonation, weak admission policy, exposed dashboards, and cloud identity integration can create more direct paths to sensitive data or infrastructure.
What Kubernetes security risks should a pentest cover?
Prioritize identities with cluster-wide permissions, workload roles that can create or modify pods, service accounts with cloud access, admission gaps, exposed API endpoints, Secrets reachable from a workload, and namespace or node boundaries that are weaker than expected.
Test both the intended policy and the effective decision. A RoleBinding may be limited on its own but combine with group membership, aggregation, impersonation, workload creation, or a controller to produce broader access. The observed API action and audit record are stronger evidence than a YAML review alone.
| Area | Test question | Evidence required |
|---|---|---|
| RBAC | Can a role or binding perform actions outside its intended scope? | Principal, role path, API action, and authorization result |
| Service accounts | What can a workload identity reach inside or outside the cluster? | Token scope, namespace, API actions, and cloud identity |
| Admission | Can a workload bypass required security controls? | Submitted object, admission policy, and admitted runtime state |
| Network | Can Pods or namespaces communicate outside policy? | Source, destination, NetworkPolicy, and observed request |
| Runtime | Can a workload reach host or sensitive runtime resources? | Pod security context, mount, command, and node evidence |
| Audit | Did the control plane record the exact identity and action? | API request correlated with Kubernetes audit event |
How should teams test Kubernetes RBAC and service accounts?
Inventory users, groups, service accounts, roles, cluster roles, bindings, aggregated roles, and any identity provider or cloud trust connected to the cluster. Map the expected purpose of each principal and then identify the actions that could expand access.
Use dedicated test identities and namespaces. Compare allowed and denied operations through the Kubernetes API, including create, patch, delete, impersonate, bind, escalate, and token-related actions. A policy that appears read-only can become powerful if the principal can create workloads or read sensitive configuration.
Workload identity needs separate attention. A Pod may obtain a service account token or cloud credential that reaches APIs outside Kubernetes. Pause before privilege escalation, secret modification, persistence, or any action that changes production access.
How do you test workload and network boundaries?
Start with a representative Pod and record its namespace, service account, security context, mounted volumes, environment, and network policy. Then test only the least invasive communication and runtime paths required to validate the boundary.
A vulnerable workload may reach a management service, sensitive namespace, cloud metadata endpoint, or host path. The finding should identify the exact runtime condition and resulting access. Network reachability by itself is not proof that a protected action is available.
Run in a dedicated lab or staging cluster first. Production testing should use isolated identities, strict rate limits, non-destructive checks, and explicit approval for actions that could affect scheduling, admission, or shared services.
- 01Authorize
Name the cluster, namespaces, identities, workloads, nodes, and exclusions.
- 02Inventory
Map RBAC, service accounts, workloads, network policy, and cloud trust.
- 03Compare
Test expected and unexpected API actions with dedicated identities.
- 04Validate
Show the resulting access from a workload, namespace, or node boundary.
- 05Review
Correlate API requests, audit records, runtime state, and impact.
- 06Retest
Repeat the exact identity and workload path after remediation.
What changes when testing managed Kubernetes?
Managed services divide responsibility between the cloud provider and the customer. The provider secures the managed control-plane infrastructure, while the customer owns identity configuration, workloads, namespaces, policy, and connected cloud resources. Confirm the provider’s testing rules before interacting with managed components.
Test customer-owned boundaries rather than attempting to attack the provider. Use supported APIs and logs, avoid actions that could affect the shared control plane, and verify that cluster audit logs, cloud audit logs, and workload evidence agree.
For self-hosted clusters, the team also owns the control-plane, nodes, certificates, upgrades, and backup paths. The evidence and remediation plan should include each of those responsibilities rather than treating Kubernetes as a single application.
Shared dependencies require special care. Ingress controllers, service meshes, identity providers, certificate services, and logging pipelines may sit outside the cluster namespace but still determine whether a path is exploitable. Include them only when they are explicitly authorized and owned by the test scope.
What evidence should a Kubernetes finding preserve?
Preserve the cluster, namespace, principal, service account, workload, node, exact API request, response, audit event, and resulting access. For a network or runtime path, include the Pod specification, security context, route, destination, and observed response.
Separate configuration risk from confirmed behavior. A privileged container definition is not the same as successful host access. A service account token is not the same as unauthorized cloud data access. Retaining the intermediate steps makes the finding reviewable and supports an accurate fix.
Evidence integrity matters when Kubernetes objects change quickly. Record resource versions, deployed image digests, namespace policy, and the time of each observation. A manifest captured after the run may not describe the cluster state that produced the result.
- Cluster, namespace, identity, workload, and node context.
- RBAC object and effective authorization decision.
- Exact API request, response, and Kubernetes audit event.
- Runtime, network, or cloud identity evidence.
- Remediation owner and same-context retest result.
What makes Kubernetes penetration testing credible?
Credible Kubernetes testing starts from a named identity or workload, proves the API or runtime boundary that was crossed, and preserves enough evidence for a platform owner to fix and retest it. It avoids treating every warning from configuration review as an exploit.
ARTEX can coordinate authorized Kubernetes-oriented workers while retaining commands, traffic, findings, and approvals. Use the cloud page when identity and account boundaries dominate, and the internal testing page when the starting position and lateral path are primarily network-level.
Keep the platform owner involved throughout the test. Cluster controls are often shared across application teams, so remediation may require a policy, role, workload, or cloud identity change that no single product team can make safely alone.
Frequently asked questions
What is Kubernetes penetration testing?
It is an authorized assessment of Kubernetes identities, RBAC, workloads, network policy, admission controls, nodes, and connected cloud resources.
Is Kubernetes penetration testing different from container scanning?
Yes. Container scanning finds image and package issues, while Kubernetes testing validates cluster permissions, configuration, runtime boundaries, and attack paths.
Can a service account create a cloud security risk?
Yes. A workload identity can be used to reach cloud APIs, data, or other services outside the cluster if its cloud permissions are too broad.
Should Kubernetes testing run in production?
Use staging or a dedicated cluster first. Production testing requires strict identity, rate, and destructive-action controls with explicit authorization.
How should a Kubernetes finding be retested?
Recreate the same identity, namespace, workload, and API or runtime path after remediation and compare the resulting audit and access evidence.
References and review notes
Start with source. Test with authorization.
Review the public ARTEX repository, run it in an owned lab, and keep human approval on actions that can change a target.
ARTEX