5 Terraform State Management Mistakes That Break Production Infrastructure
Avoid these critical Terraform state management errors that cause race conditions, lost infrastructure, and exposed credentials.
We use cookies for our website to give you the most relevant experience by remembering your preferences. By clicking “accept”, you consent to use of ALL the cookies
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
| Cookie | Duration | Description |
|---|---|---|
| cookielawinfo-checkbox-functional | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category “Analytics”. |
| cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category “Functional”. |
| cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category “Necessary”. |
| cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category “Other. |
| cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category “Performance”. |
| viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
Cyberia Tech, Inc. respects your privacy. This Privacy Policy explains how we collect, use, and share your information. By using our services, you agree to this policy. If any other agreements conflict with this Privacy Policy, the terms of those agreements prevail.
Cyberia Tech complies with the EU-US and Swiss-US Privacy Shield Frameworks for handling personal data from the EEA, UK, and Switzerland. In case of any conflict, the Privacy Shield Principles prevail. Learn more at Privacy Shield. Key Definitions
Information linked to an individual, transferred from the EEA, UK, or Switzerland to the U.S.
Data revealing race, religion, health, sexual orientation, and similar categories.
Effective Date: [ 2026 / 11 / 26 ]
Welcome to The Cyberia Tech ! By accessing or using our website or services, you agree to
comply with and be bound by these Terms of Use and our Privacy Policy. If you do not agree with
these terms, please do not use our Services.
Loading
0 %
A comprehensive kubernetes security checklist in 2026 demands migrating away from deprecated PodSecurityPolicies to Pod Security Admission, enforcing the CIS Benchmark v2.1.0, and auditing node restriction controls. Passing an audit requires explicitly mapping bound service account tokens and validating workload configurations before they reach the API server.
Operating an outdated Kubernetes cluster guarantees exploitation. When version 1.31 reached its End of Life in late 2025, clusters remaining on that release stopped receiving security patches, leaving them exposed to control plane bypasses. Engineering teams now face a strict decision: either continually maintain active minor versions like 1.35, 1.36, or 1.37, or accept structural vulnerabilities. Upgrading your modern web application infrastructure is non-negotiable. Sticking to old admission controllers breaks deployments, while unpatched nodes expose your internal networking to hostile container breakouts.
Kubernetes operates on a strict 14-month support window for minor releases. Security teams cannot rely on prolonged legacy support. Version 1.31 officially reached its End of Life (EOL) in late 2025. TecAdmin documented this cutoff, confirming that 1.31 no longer receives free security updates. Any cluster running 1.31 or older in late 2026 operates with known, unpatched vulnerabilities. As of late 2026, actively supported minor versions include 1.35, 1.36, and 1.37. Auditing your cluster begins with verifying the API server version and matching it against the current release cycle.
Running an EOL version guarantees that newly discovered Common Vulnerabilities and Exposures (CVEs) remain open in your environment. The Kubernetes release team does not backport fixes to unsupported branches. If an attacker discovers a flaw in the kubelet’s container runtime interface handling, your worker nodes are defenseless. You must schedule rolling upgrades to 1.35 or higher. This process requires cordoning nodes, draining workloads, and updating the control plane before upgrading worker node components. Delaying this process increases technical debt and exposes the infrastructure to automated exploitation.
Many organizations delay upgrades because they fear breaking changes in API resources. However, retaining old versions introduces higher operational risks. Upgrading ensures that the control plane, kubelet, and kube-proxy components benefit from the latest memory safety improvements and performance optimizations. A strict version audit determines your immediate exposure. If the cluster runs 1.31, your security checklist must prioritize a migration plan before addressing individual workload configurations.
The method for restricting container capabilities fundamentally changed. PodSecurityPolicy (PSP) was fully removed from Kubernetes in version v1.25. Clusters that previously relied on complex, mutating PSPs to inject default security contexts or drop root privileges must now use the built-in Pod Security Admission (PSA) controller. PSA enforces security through three fixed standard levels: Privileged, Baseline, and Restricted. These standards map directly to established container security best practices, eliminating the need to write custom Rego policies for basic workload isolation.
| PSA Level | Validation Focus |
|---|---|
| Privileged | Unrestricted policy allowing known privilege escalations; reserved for system daemons. |
| Baseline | Minimally restrictive policy that prevents known privilege escalations for default apps. |
| Restricted | Heavily restricted policy enforcing strict pod hardening and root-dropping best practices. |
PSA operates differently from its predecessor. It acts solely as a validating admission controller. PSA does not mutate pod specifications. If a developer submits a Deployment that requests root access in a namespace governed by the Restricted policy, PSA rejects the submission entirely rather than modifying it to drop privileges. Cloudfleet emphasizes this non-mutating behavior. Engineering teams must explicitly define safe configurations within their Helm charts or Kustomize manifests, ensuring the workload conforms to the namespace’s enforcement level before hitting the API server.
Applying PSA requires labeling namespaces. Administrators assign policies using specific namespace labels, such as pod-security.kubernetes.io/enforce: restricted. This declarative approach allows granular control over cluster segments. Infrastructure namespaces running network daemons can operate under Privileged or Baseline, while namespaces hosting standard web applications operate strictly under Restricted. Furthermore, the SecurityContextDeny admission controller, which was deprecated in Kubernetes 1.27, is officially superseded by the Pod Security admission controller, forcing administrators to consolidate their validation logic into PSA.

Restricting what a container can execute on the host node remains a critical security boundary. AppArmor support graduated to a Stable feature in Kubernetes 1.31. This graduation allows cluster administrators to restrict container capabilities natively, significantly reducing the attack surface. AppArmor profiles define exactly which files a process can read, write, or execute, and which system calls it can invoke. By applying an AppArmor profile to a Pod, the kubelet instructs the container runtime to enforce these strict behavioral limits at the kernel level, blocking unexpected execution paths even if an attacker achieves remote code execution.
Beyond process restriction, Kubernetes fundamentally isolates user identities. User Namespaces migrated to Beta in Kubernetes 1.30. This feature provides finer pod isolation by mapping host system UIDs and GIDs to unique ranges inside the pod. When a container runs as “root” (UID 0) inside its user namespace, the kernel maps that UID to a high, unprivileged UID on the actual host node. If an attacker escapes the container sandbox, they find themselves operating as a completely unprivileged user on the worker node, unable to modify system binaries or access sensitive host mounts.
Implementing AppArmor and User Namespaces requires updating workload manifests and node configurations. Worker nodes must have AppArmor enabled in their kernel parameters, and container runtimes must support user namespace remapping. When auditing your infrastructure, verify that high-risk workloads utilize these features. Combined, they create a robust defense-in-depth strategy, ensuring that a compromised application cannot easily pivot to compromise the underlying infrastructure.
A kubernetes rbac audit must scrutinize how workloads authenticate against the API server. Historically, Kubernetes mounted long-lived, static service account tokens into every pod by default. These tokens never expired and could be used from anywhere if stolen. Bound Service Account Tokens entered Beta in Kubernetes 1.30, tightening Role-Based Access Control (RBAC) by binding service account tokens directly to the specific pods that need them. These tokens are time-bound, audience-bound, and structurally tied to the pod’s lifecycle.
When a pod terminates, its bound token immediately becomes invalid. The kubelet uses a projected volume to request these short-lived tokens directly from the TokenRequest API. This mechanism ensures that if an attacker exfiltrates a token from a running pod, they have a highly limited window to utilize it. Furthermore, the API server rejects requests using that token if they originate from outside the cluster, depending on the configured audience and networking boundaries. This mechanism stops credential theft dead in its tracks.
Auditing RBAC requires inspecting all RoleBinding and ClusterRoleBinding configurations. Avoid granting cluster-wide permissions unless absolutely necessary. Map specific service accounts to individual deployments, rather than relying on the default service account. You must ensure that applications that do not require API server access have automountServiceAccountToken: false explicitly set in their pod templates. Treating service account tokens with the same severity as AWS IAM credentials prevents horizontal escalation within the cluster.

The NodeRestriction admission controller prevents kubelets from modifying Node objects they do not own or accessing secrets not bound to their scheduled pods. It serves as a vital firewall between compromised worker nodes and the control plane. However, even core security components contain flaws. A medium-severity security vulnerability identified as CVE-2025-5187 (CVSS 6.7) in the NodeRestriction admission controller allowed compromised nodes to bypass restrictions. This flaw allowed a hostile kubelet to manipulate labels and potentially alter scheduling constraints.
The Kubernetes security team patched this vulnerability in versions 1.33.4, 1.32.8, and 1.31.12. If your cluster operates below these patch levels, an attacker who compromises a single worker node can escalate their privileges to impact other nodes or control plane scheduling logic. Auditing your cluster requires verifying that the API server runs a patched version and that the NodeRestriction admission plugin is explicitly enabled in the API server startup flags.
Mitigating node-level compromises also requires evaluating your CNI. Relying on legacy netfilter setups introduces performance overhead and security blind spots. Modern architectures evaluate eBPF vs iptables for Kubernetes networking, leveraging eBPF to enforce network policies directly at the kernel socket layer. This approach drops unauthorized packets before they even traverse the networking stack, providing a stronger defense against lateral movement originating from a compromised node.

The Center for Internet Security (CIS) provides the industry-standard baseline for Kubernetes security. The latest CIS Kubernetes Benchmark is v2.1.0, published on September 30, 2026. Cloud Security Testing confirms this release, which incorporates checks for modern features like Pod Security Admission and removes obsolete references to PodSecurityPolicies. The benchmark categorizes controls into control plane configuration, etcd security, worker node hardening, and workload policies.
Organizations often attempt to automate the entire benchmark process. However, a fully automated pass of the CIS Kubernetes Benchmark is structurally impossible. Tools like kube-bench analyze cluster configurations, but they mark many checks as “Not Scored” or manual. For example, verifying that KMS encryption is properly configured for secret data at rest, or ensuring that container images only originate from trusted private registries, requires off-cluster validation. Human auditors must review these architectural controls.
On managed platforms like AKS, 15 policy checks and 13 managed-service checks require manual validation. An automated scanner cannot determine if a specific RBAC policy legitimately aligns with your organization’s internal compliance requirements. Security teams must treat the CIS Benchmark as a comprehensive framework, combining automated configuration scanning with manual architectural reviews. You must maintain written documentation detailing how your infrastructure satisfies the “Not Scored” controls.

Executing a kubernetes security checklist differs drastically depending on where the cluster runs. In managed Kubernetes environments such as Amazon EKS, Azure AKS, and Google GKE, Sections 1 through 3 of the CIS Benchmark are mostly non-applicable to the user. These sections cover control plane node configuration, API server flags, and etcd security. The cloud provider operates the control plane, assuming responsibility for securing the underlying virtual machines, encrypting the etcd database, and configuring the API server admission controllers.
Because the cloud provider locks down the control plane, your security posture management must shift focus to Section 4: Worker Nodes and Workload Policies. You control the kubelet configuration on the worker nodes, the network policies governing pod communication, and the RBAC roles assigned to users and service accounts. Ensuring that workloads comply with organizational policies requires deploying policy engines like Kyverno or OPA Gatekeeper to evaluate resources that the cloud provider’s default configurations might permit.
Operating managed clusters also demands strict management of cloud-native integrations. Misconfiguring an AWS IAM role tied to a Kubernetes service account can grant a pod administrative access to your entire AWS account. You must audit the infrastructure-as-code deploying these clusters. Avoiding critical Terraform state management errors ensures that security group rules and IAM policies remain drift-free and restrict access strictly to intended workloads.
Pod Security Admission provides a standardized method for securing workloads, but its implementation requires understanding its operational modes. PSA operates in three modes: audit, warn, and enforce. When you configure a namespace with warn or audit, the admission controller evaluates all workload resources, including Deployments, DaemonSets, and ReplicaSets. It logs violations or warns the developer submitting the manifest without blocking the deployment.
However, the enforce mode behaves differently. It strictly applies only to actual Pod objects. If a developer submits a non-compliant Deployment, the API server accepts the Deployment object. The failure occurs later when the ReplicaSet attempts to create the Pod objects based on the template. The PSA webhook rejects the Pod creation, leaving the Deployment stuck in an unready state. This separation between resource acceptance and pod rejection complicates troubleshooting for developers who expect immediate rejection of their deployment manifests.
Migrating from deprecated mutation policies to strict validation requires significant preparation. If you apply the Restricted enforcement level to a namespace running legacy applications that expect to run as root, the application will fail to schedule. Security teams must first apply the warn and audit labels, monitor the API server audit logs for violations, and remediate the application manifests before switching the namespace to enforce. Rushing this process guarantees production outages.
A prevalent misconception in Kubernetes security is that running an automated scanner against your cluster ensures you are fully aligned with the CIS benchmark and immune to exploitation. Reality proves otherwise. Configuration posture scanning, such as running kube-bench, and vulnerability scanning, such as running Trivy against container images, are complementary but fundamentally distinct operations. Posture scanners verify API flags and kubelet settings; they do not detect vulnerable Apache Struts libraries running inside your containers.
Relying solely on configuration scanners creates a false sense of security. Many CIS controls check organizational policies, such as whether a trust policy fits its designated users. An automated tool cannot evaluate the business logic behind an RBAC role binding. It only verifies if the syntax is valid. If you grant cluster-admin privileges to a service account, the configuration scanner might pass the syntax check, but the architectural flaw remains.
Failure to integrate scanning into the continuous integration pipeline results in late-stage failures. If you only scan resources after they are deployed to the cluster, you are relying on admission controllers to block bad configurations in production. Security checks must shift left. You must parse Kustomize outputs and Helm charts through tools like Checkov or Kubescape during the CI phase, preventing misconfigured workloads from ever requesting access to the Kubernetes API server.
Pod Security Admission (PSA) officially replaced PodSecurityPolicy, which was removed in Kubernetes v1.25. PSA acts as a validating admission controller, enforcing exactly three standard levels—Privileged, Baseline, and Restricted—via namespace labels rather than using complex custom mutating rules.
No, a fully automated pass is structurally impossible. Tools flag many checks as ‘Not Scored’ because they require off-cluster validation. Human auditors must manually review architectural controls like KMS encryption, registry security policies, and external private endpoints.
Kubernetes version 1.31 reached its End of Life (EOL) in late 2025. It no longer receives free security updates or vulnerability patches. Clusters running this version in 2026 are actively exposed and must upgrade to supported minor versions like 1.35 or 1.36.
Bound service account tokens tighten RBAC by binding directly to the specific pods that need them. Unlike legacy static tokens, they are time-bound and automatically invalidate when the pod terminates, drastically reducing the window for credential theft and API abuse.
Executing a rigorous kubernetes security checklist in 2026 requires understanding the exact mechanisms enforcing cluster boundaries. Upgrading past the 1.31 EOL ensures you possess the fundamental patches necessary to defend the control plane from known node restriction bypasses. Migrating your admission control to the Pod Security Admission controller guarantees compliance with standardized security practices, explicitly blocking privileged escalation attempts at the namespace level.
Your immediate next step is to audit your active namespaces for PSA enforcement labels and verify your current cluster version. Map your deployments against the CIS Benchmark v2.1.0, explicitly documenting the manual architectural controls your scanners cannot evaluate. By deploying AppArmor profiles and validating bound service account tokens, you strip away the excessive permissions that enable lateral movement, forcing attackers to confront hardened, isolated infrastructure.
You Can Get More Information!
wow interesting