What Is Kubernetes Cluster Security?

Kubernetes cluster security is the practice of protecting an entire Kubernetes cluster: the control plane and API server, the worker nodes, the identities and RBAC policies that grant access, the pod-to-pod network, and the secrets and images that workloads rely on. Its goal is to keep a single misconfiguration or compromised container from escalating into full control of the cluster and the cloud account beneath it.

container_escape

Kubernetes Cluster Security Defined

Kubernetes runs your applications as a fleet of containers spread across many machines, and it coordinates all of it through a central brain called the control plane. Cluster security is the discipline of protecting that whole system: the control plane, the worker nodes that run your workloads, the network between them, and the identities and policies that decide who can do what.

A useful way to think about it is the "4C" model from the Kubernetes project: Cloud, Cluster, Container, and Code. Each layer sits inside the one below it. A weakness in the cloud account exposes the cluster, a weak cluster exposes the containers, and vulnerable code inside a container gives an attacker a foothold to work back outward. Cluster security is the middle layer that ties the platform together, and it is where most real-world Kubernetes compromises begin.

The stakes are high because a single misconfiguration rarely stays contained. Kubernetes is a soft target by default: it trusts components on the internal network, stores secrets in a way that is only encoded rather than encrypted, and hands out powerful permissions to service accounts unless you deliberately lock them down. An attacker who lands in one pod often finds a short path to the cloud credentials attached to the node, and from there to the rest of the environment.

Why Does Kubernetes Cluster Security Matter?

Kubernetes has become the default way to run containerized workloads, which means it now sits underneath a large share of the applications that handle sensitive data. That popularity makes it a priority target. The orchestration layer is complex, its defaults favor convenience over safety, and clusters are frequently exposed to the internet through dashboards, API servers, or ingress controllers that were never meant to be public.

When a cluster is breached, the blast radius is unusually large. The control plane can schedule a workload onto any node, read every secret, and reach every namespace. A foothold in one tenant can become full cluster-admin, and cluster-admin in a cloud-managed cluster often leads directly to the underlying cloud account through the node's instance role. Cryptomining, data theft, and supply-chain tampering have all been carried out by simply finding an unauthenticated Kubernetes endpoint and walking in.

How Does Kubernetes Cluster Security Work?

Securing a cluster means defending each part of the architecture in turn. The main components an attacker targets, and that you therefore need to protect, are:

  1. The control plane. The API server (kube-apiserver) is the front door to the cluster, backed by etcd, the key-value store that holds all cluster state including secrets. If an attacker reaches etcd or an unauthenticated API server, they own the cluster.
  2. The nodes. Each worker runs a kubelet and a container runtime. An exposed or misconfigured kubelet API can let an attacker execute commands inside running containers without ever touching the API server.
  3. Identity and access. Role Based Access Control (RBAC) decides which users and service accounts can perform which actions. Overly broad roles, wildcard permissions, and default service account tokens are among the most common paths to escalation.
  4. Workloads and pods. Containers that run as root, mount the host filesystem, use host networking, or run in privileged mode can break out to the node. Pod Security Admission is the built-in control that keeps workloads within safe boundaries.
  5. The network. By default every pod can talk to every other pod. Network policies segment traffic so a compromised workload cannot freely move laterally or reach the cloud metadata service.
  6. Secrets and the supply chain. Kubernetes secrets are base64-encoded, not encrypted, unless you enable encryption at rest. Container images pulled from untrusted registries can introduce malicious code before a workload ever starts.

Strong cluster security applies the principle of least privilege at every one of these layers, assumes any single control can fail, and adds detection so that a breach of one boundary does not go unnoticed.

Kubernetes Cluster Security Across AWS, Azure, and Google Cloud

Most teams run Kubernetes through a managed service, where the cloud provider operates the control plane and you secure everything you deploy onto it. This is the shared responsibility model applied to Kubernetes: the provider patches and hardens the managed control plane, but RBAC, network policy, pod configuration, and identity are yours to get right. The building blocks differ by provider.

Amazon EKS

Elastic Kubernetes Service authenticates users through AWS IAM and maps them to Kubernetes permissions with EKS access entries (the successor to the aws-auth ConfigMap). The most important hardening step is giving pods their own scoped identity through IAM Roles for Service Accounts (IRSA) or EKS Pod Identity, rather than letting them inherit the node's IAM role. Blocking access to the instance metadata service, or lowering the IMDS hop limit, stops a compromised pod from stealing the node's credentials. GuardDuty EKS Protection adds audit-log and runtime monitoring.

Azure AKS

Azure Kubernetes Service integrates with Microsoft Entra ID for authentication and supports Azure RBAC for Kubernetes so cluster access is governed by the same identity platform as the rest of your Azure estate. Workload Identity binds a Kubernetes service account to a managed identity so pods get short-lived, scoped tokens. Azure Policy for AKS enforces guardrails at admission using the Open Policy Agent Gatekeeper engine, and Microsoft Defender for Containers provides threat detection.

Google GKE

Google Kubernetes Engine offers Workload Identity Federation to map Kubernetes service accounts to Google service accounts without long-lived keys. Shielded GKE Nodes protect against boot-level tampering, Binary Authorization enforces that only signed, approved images are deployed, and the built-in Security Posture dashboard surfaces misconfigurations and workload vulnerabilities. GKE Autopilot applies many of these hardening defaults automatically.

Real-World Kubernetes Cluster Breaches

Kubernetes security is not theoretical. Each of the following is a documented, dated incident that shows how quickly a small oversight becomes a full compromise.

Tesla cryptojacking (2018)

In February 2018, researchers at RedLock reported that Tesla's Kubernetes dashboard was exposed to the internet without password protection. Attackers used the open console to run cryptomining software inside the cluster and, in the process, gained access to an environment that contained sensitive telemetry and AWS credentials. It remains the textbook example of why an exposed, unauthenticated Kubernetes management interface is so dangerous.

CVE-2018-1002105, API server privilege escalation (2018)

Disclosed in December 2018, this was the first critical vulnerability in Kubernetes itself. A flaw in how the API server handled proxied upgrade requests let an unauthenticated attacker send crafted requests straight to backend services, escalating to full cluster-admin. Rated critical, it affected every cluster running versions before 1.10.11, 1.11.5, and 1.12.3, and it forced a rapid, industry-wide patching effort.

IngressNightmare (CVE-2025-1974, 2025)

In March 2025, researchers at Wiz disclosed a set of vulnerabilities in the widely deployed Ingress NGINX Controller, tracked under CVE-2025-1974 and related identifiers. Because the controller's admission webhook was reachable on the internal pod network without authentication, an attacker who could send traffic inside the cluster could achieve unauthenticated remote code execution and, with the controller's broad permissions, read every secret in the cluster. It affected a large share of Kubernetes environments that used the ingress-nginx controller and underlined how a single in-cluster component can undo the whole security model.

How Do You Secure a Kubernetes Cluster?

There is no single switch for cluster security. A hardened cluster layers several controls so that the failure of any one of them is not fatal:

  1. Apply least-privilege RBAC. Avoid wildcard verbs and resources, do not bind users to cluster-admin, and disable automatic mounting of the default service account token where it is not needed.
  2. Enforce Pod Security Admission. Apply the baseline or restricted profile so workloads cannot run privileged, as root, with host networking, or with the host filesystem mounted. This replaced the removed PodSecurityPolicy feature.
  3. Segment the network. Adopt default-deny network policies with a CNI that supports them, such as Calico or Cilium, and explicitly block pod access to the cloud instance metadata endpoint.
  4. Protect the control plane. Disable anonymous authentication on the API server and kubelet, restrict who can reach them, and enable encryption at rest for etcd so secrets are not stored in plaintext.
  5. Control what gets deployed. Use admission controllers or policy engines like OPA Gatekeeper or Kyverno to reject non-compliant resources, and scan container images for known vulnerabilities before they run.
  6. Scope cloud identity to the pod. Use IRSA, Workload Identity, or the equivalent so a compromised container cannot inherit powerful node-level cloud permissions.

How Do You Detect Attacks Against a Kubernetes Cluster?

Prevention buys you time, but detection is what limits damage when a control fails. The single most valuable source is the Kubernetes audit log, which records every request to the API server. A tuned audit policy that captures sensitive verbs, such as exec into a pod, secret reads, and RBAC changes, gives responders the trail they need. Runtime tools like Falco watch system calls inside containers and alert on suspicious behavior, such as a shell spawning in a container that should never run one, or a process reaching for the cloud metadata service. On managed platforms, GuardDuty EKS Protection, Defender for Containers, and the GKE Security Posture dashboard fold this telemetry into the wider cloud detection stack. The behaviors worth alerting on are consistent: anonymous or unexpected API access, sudden privilege grants, new workloads running as privileged, and pods trying to reach infrastructure they have no business contacting.

Kubernetes Cluster Security vs Container Security

These terms are often used interchangeably, but they describe different layers. Container security focuses on the individual workload: building minimal, trusted images, scanning them for vulnerabilities, keeping them patched, and isolating the running container from the host. Cluster security focuses on the orchestration layer that runs those containers: the API server, RBAC, network policy, multi-tenancy, and the control plane.

The 4C model makes the relationship clear. Code runs inside a Container, the Container runs inside a Cluster, and the Cluster runs inside the Cloud. A perfectly hardened container is still exposed if the cluster around it grants it cluster-admin or lets it reach the node's credentials. In practice you need both: secure images to reduce what an attacker can bring in, and a secure cluster to limit what they can do once they are inside.

Practice Kubernetes Cluster Security Hands-On

The fastest way to understand cluster security is to attack and defend a real cluster rather than read about it. Pwned Labs runs hands-on cloud and Kubernetes labs where you exploit realistic misconfigurations, from exposed dashboards and over-permissive RBAC to metadata-service credential theft and pod breakout, then learn the fix. Related concepts are covered in our explainers on the Kubernetes admission controller and the privileged container.

To go from individual techniques to end-to-end cluster attack and defense, and to validate the skill with a certification, the Kubernetes Attack and Defense bootcamp leads to the Kubernetes Red Team Professional (KRTP) certification. For the wider curriculum, see our Kubernetes and container security training overview.

Frequently Asked Questions

What is Kubernetes cluster security?

Kubernetes cluster security is the practice of protecting an entire cluster, including the control plane and API server, the worker nodes, the RBAC identities that grant access, the pod network, and the secrets and images workloads use. The goal is to stop a single misconfiguration or compromised container from escalating into control of the whole cluster.

What are the biggest Kubernetes security risks?

The most common are an exposed API server or dashboard, over-permissive RBAC such as wildcard roles and default cluster-admin, privileged or root pods that can break out to the node, flat pod-to-pod networking that allows free lateral movement, and pods stealing the node's cloud credentials through the instance metadata service.

Is Kubernetes secure by default?

No. Kubernetes defaults favor usability over safety. Pod networking is flat, secrets are only base64-encoded rather than encrypted, and service accounts often receive broad tokens. A cluster must be deliberately hardened with RBAC, network policies, Pod Security Admission, and encryption at rest before it can be considered secure.

How do you secure an EKS, AKS, or GKE cluster?

Apply least-privilege RBAC, give pods scoped cloud identity through IRSA on EKS or Workload Identity on AKS and GKE, enforce default-deny network policies, apply Pod Security Admission, scan images before deployment, and enable audit logging. Layer the provider's managed detection, such as GuardDuty EKS Protection, Defender for Containers, or the GKE Security Posture dashboard.

What is the difference between Kubernetes cluster security and container security?

Container security protects the individual workload: the image, its vulnerabilities, and its isolation from the host. Cluster security protects the orchestration layer that runs those containers: the API server, RBAC, network policy, multi-tenancy, and the control plane. A hardened container is still at risk in a weak cluster, so you need both.

Learn this hands-on in a bootcamp

 


Train, certify, prove it


Our bootcamps combine expert-led instruction with real cloud environments. Complete the training, pass the exam, and earn an industry-recognized certification.



MCRTE_-1

What practitioners say.

Caleb Havens

Red Team Operator & Social Engineer, NetSPI


"I’ve attended two training sessions delivered by Pwned Labs: one focused on Microsoft cloud environments and the other on AWS. Both sessions delivered highly relevant content in a clear, approachable manner and were paired with an excellent hands-on lab environment that reinforced key concepts and skills for attacking and defending cloud infrastructures. The training was immediately applicable to real-world work, including Red Team Operations, Social Engineering engagements, Purple Team exercises, and Cloud Penetration Tests. The techniques and insights gained continue to be referenced regularly and have proven invaluable in live operations, helping our customers identify vulnerabilities and strengthen their cloud defenses."

Sebas Guerrero

Senior Security Consultant, Bishop Fox


"The AWS, Azure, and GCP bootcamps helped me get up to speed quickly on how real cloud environments are built and where they tend to break from a security standpoint. They were perfectly structured, with real-world examples that gave me rapid insight into how things can go wrong and how to prevent those issues from happening in practice. I’m now able to run cloud pentests more confidently and quickly spot meaningful vulnerabilities in customers’ cloud infrastructure.

Dani Schoeffmann

Security Consultant, Pen Test Partners


"I found the Pwned Labs bootcamps well structured and strongly focused on practical application, with clear background on how and why cloud services behave the way they do and how common attack paths become possible. The team demonstrates both sides by walking through attacks and the corresponding defenses, backed by hands-on labs that build confidence using built-in and third-party tools to identify and block threats. The red-team labs are hands-on and challenge-driven, with clear walkthroughs that explain each step and the underlying logic. I’ve seen several of these techniques in real engagements, and the bootcamp helped me develop a repeatable methodology for cloud breach assessments and deliver more tailored mitigation recommendations."

Matt Pardo

Senior Application Security Engineer, Fortune 500 company


"I’ve worked in security for more than 15 years, and every step up came from taking courses and putting the lessons into practice. I’ve attended many trainings over the years, and Pwned Labs’ bootcamps and labs are among the best I’ve experienced. When you factor in how affordable they are, they easily sit at the top of my list. As a highly technical person, I get the most value from structured, hands-on education where theory is immediately reinforced through labs. Having lifetime access to recordings, materials, and training environments means you can repeat the practice as often as needed, which is invaluable. If you’re interested in getting into cloud security, sign up for Pwned Labs.

Steven Mai

Senior Penetration Tester, Centene


Although my background was mainly web and network penetration testing, the ACRTP and MCRTP bootcamps gave me a solid foundation in AWS and Azure offensive security. I’m now able to take part in cloud penetration testing engagements and have more informed security discussions with my team.

 

Got any Questions? Get in touch