Kubernetes for PCI DSS segmentation and logging

A requirement-by-requirement view of how a self-managed Kubernetes cluster can support PCI DSS v4.0.1 network security controls and audit logging, what configuration it needs, the evidence it produces, and what the platform does not cover.

On this page

Kubernetes for PCI DSS segmentation and logging: which requirements the platform helps with

For teams running or planning cardholder data workloads on Kubernetes that must show PCI DSS v4.0.1 compliance, the platform helps with Requirements 1.2, 1.3 and 10.2 through three mechanisms: network policies, change control of policy as code, and Kubernetes API audit logs. These mechanisms produce controls and evidence that an assessor can examine, and that is where their contribution ends. Kubernetes does not define the cardholder data environment. The PCI SSC glossary defines the CDE as the system components, people and processes that store, process or transmit cardholder data or sensitive authentication data, plus system components with unrestricted connectivity to them. Your team must identify those components before any policy is written, including cluster nodes, the control plane, container registries, CI runners, secrets stores and log backends. Kubernetes also does not decide scope, does not make an entity compliant, and does not replace an assessment by a Qualified Security Assessor or a Self-Assessment Questionnaire with an Attestation of Compliance.

PCI DSS v4.0.1, published on 11 June 2024, is the only active version, because v4.0 retired on 31 December 2024. The payment brands, not the PCI SSC, decide which entities must validate and they run any enforcement programs. Validation is documented either as a Report on Compliance completed by a Qualified Security Assessor or as a Self-Assessment Questionnaire with an Attestation of Compliance. Certificates from other providers are not recognized as validation. Confirm with your acquirer or payment brand which route applies to your organization, and confirm with your assessor which evidence from the cluster they will accept for each requirement.

Before the assessment, check three things in a test cluster. First, confirm that the container network interface plugin enforces NetworkPolicy objects, because a policy that is stored but not enforced will not function as a network security control under Requirement 1.3. Second, confirm that policy manifests live in version control, that changes pass a reviewed merge process, and that the process matches the change control defined for Requirement 1.2.2 through Requirement 6.5.1. Third, confirm that the API server audit policy records the fields Requirement 10.2.2 expects, and that audit events are sent to storage that cluster administrators cannot quietly change.

Record which network security control rules protect each boundary of the CDE, and document the approved services, protocols and ports those rules allow. Treat the Git repository, the pipeline that applies manifests, and any generated or synchronized configuration as configuration files that must be secured and kept consistent with the active cluster state, as Requirement 1.2.8 expects. Plan for drift, since a manual change made during an incident can leave the repository and the running cluster out of agreement. Ask your assessor early which of these items they will test directly and which they will accept as documented.

Mapping PCI DSS requirements 1.2, 1.3 and 10.2 to Kubernetes controls

This table maps the PCI DSS v4.0.1 network security control, change control and audit logging requirements for cardholder data workloads to the Kubernetes controls that typically address them. Read each row left to right: the capability is what the cluster provides, the configuration is what your team must set, and the evidence is what an assessor will ask to see. Treat the mapping as a starting point, and confirm with your network plugin vendor that the CNI plugin enforces NetworkPolicy objects before relying on it.

RequirementKubernetes capabilityConfiguration neededEvidence an assessor will ask for
1.2 Network security controls configured and maintainedNetworkPolicy objects and Git-managed configuration as NSC rulesetsPolicies scoped to cardholder namespaces and applied only from reviewed Git commitsNetwork diagram, data-flow diagram and an export of current policies matching the cluster
1.2.2 Network changes approved through change controlGitOps pull request flow with protected branchesProtected main branch, required reviewers, and merges linked to a change ticketApproved pull requests, change tickets and GitOps controller sync history for each policy change
1.2.8 Configuration files secured and kept consistentCluster and namespaced policy as code stored in GitRestricted repository access, backups of the repository, and drift detection against live policyRepository access list, drift alerts and a comparison of Git and live policy objects
1.3.1 Inbound CDE traffic restrictedDefault-deny ingress NetworkPolicy in cardholder namespacesDefault-deny ingress policy per namespace, then allow rules for listed sources and portsPolicy manifests, a list of permitted inbound flows and test results showing denied traffic
1.3.2 Outbound CDE traffic restrictedDefault-deny egress NetworkPolicy in cardholder namespacesDefault-deny egress policy per namespace, with explicit allow rules for approved destinationsEgress rule inventory mapped to business need, and test results showing blocked connections
1.3.3 Wireless networks separated from the CDENetwork controls outside the cluster, such as firewalls or network devicesCluster policies do not cover wireless networks, so confirm the boundary at network infrastructureNetwork diagram showing wireless segments and the controls between them and the CDE
10.2.1 Audit logs enabled for system componentsKubernetes API server audit policyAudit policy enabled on kube-apiserver, plus node and workload log collection to protected storageAudit policy file, API server flags, and sample events from each logged resource type
10.2.2 Log entries record required detailsAudit event fields for verb, user, timestamp, response status and object referenceAudit levels set for secrets, RBAC and workload changes, with identity from OIDC or client certificatesSample events showing event type, time, outcome, source identity and affected resource

How network policies become network security controls under requirement 1.2 and 1.3

Requirement 1.2 applies to network security controls, which filter traffic between networks. An assessor may treat more than one Kubernetes component as an NSC, so the team should inventory every enforcement point on the path to cardholder data before writing rules. Each one needs a ruleset that denies all traffic not specifically allowed for the CDE.

Typical enforcement points:

  • NetworkPolicy objects: namespaced rules that select pods and allow ingress or egress. An object on its own enforces nothing until a supporting CNI applies it.
  • The CNI plugin: the component that enforces NetworkPolicy. Confirm with the distribution and CNI vendor which policy features and pod network modes it enforces.
  • Cloud security groups and network ACLs: rules around node pools, subnets and load balancers.
  • Perimeter firewalls: devices between the cluster and other zones, including paths entering from outside the network.

Kubernetes allows traffic to any pod that no NetworkPolicy selects, so a default-deny policy in each CDE namespace is the starting point for every ruleset. Confirm that each enforcement point has a named owner, a written ruleset and a defined source of evidence.

What change control for policy as code must show under requirement 1.2.2

Requirement 1.2.2 requires every change to network connections and NSC configurations to be approved and managed through the change control process in requirement 6.5.1. In a Kubernetes cluster, the policy as code workflow is where much of that evidence is produced, and the SAQ D notes for requirement 1.2.8 extend the same expectations to the configuration files behind it.

Version-controlled NetworkPolicy repository

Every NetworkPolicy, namespace label set and related manifest that defines segmentation lives in a Git repository, so each change to a network connection or NSC configuration has a recorded author, timestamp and diff. Requirement 1.2.8 treats infrastructure as code, scripts and backed-up or remotely stored settings that configure NSCs as configuration files that must be secured and kept consistent with the active configuration. Check that the repository holds everything that affects CDE traffic, including Helm values, Kustomize overlays and cluster-wide policy objects.

Review and approval by a second person

Each change to a segmentation policy is proposed as a pull request and merged only after someone other than its author reviews and approves it. Branch protection should block direct pushes to the main branch and prevent the author from approving their own change. Confirm with your QSA how this review step maps to the approval expectation in 1.2.2 and the process defined in 6.5.1, and which pull request records must be retained as evidence.

Deployed state matches approved state

Requirement 1.2.2 covers what is running in the cluster as well as what was approved, so the team needs a way to show that the policies applied match the merged revision. GitOps controllers such as Argo CD can report drift between the repository and the live cluster, and those drift reports can serve as evidence. Check how drift is detected, who receives alerts and how unapproved live changes, such as manual edits made during an incident, are reverted or recorded.

Credentials that can change policy

Any account, service account, CI runner or deploy key that can write NetworkPolicy objects, merge to the protected branch or deploy to the cluster can change segmentation without passing through review. Inventory every identity with these rights, and limit them with RBAC rules scoped to networking resources in the relevant namespaces. Protect administrative access to the repository and the secrets that deploy pipelines use, and review these grants on a schedule your QSA agrees is adequate.

Change control process documented with the QSA

The cluster does not create a change control process on its own. Requirement 1.2.2 points to the process defined in 6.5.1, so the organization needs that process written down, with roles, approval steps, testing expectations and records, before Kubernetes controls can be cited as evidence. Ask your QSA how they expect 6.5.1 to be documented, which artifacts they will sample, and whether repository history and pipeline logs are acceptable records for the assessment.

How Kubernetes API audit logs address requirement 10.2.1 and 10.2.2

Requirement 10.2.1 expects audit logs to be enabled and active for all system components and cardholder data, and requirement 10.2.2 defines what each entry must record: event type, date and time, success or failure, origination, and the identity of the affected data, component, resource or service. In a Kubernetes cluster, the kube-apiserver is the most useful point to satisfy this, because every create, read, update, patch and delete request to the API passes through it. The API server only writes audit events when an audit policy and a log backend are configured, so the first task is to confirm which audit policy levels your chosen distribution ships with and which fields it actually writes. Node and container runtime logs are a separate question and need their own mapping.

The origination field depends on how each caller authenticates. Kubernetes supports X.509 client certificates, bearer tokens including OpenID Connect and JWT, webhook token authentication and authenticating proxies, and each method passes a different identity into the audit record. For OIDC, the username and group claims you configure determine what appears in the log, so confirm the claim mapping with your identity team before you rely on it. A shared admin certificate weakens this field badly, because every action is attributed to the same subject and an assessor cannot tie a change to a person. Inventory how administrators, CI pipelines and service accounts authenticate, and plan to retire shared certificates for daily operations.

Secrets need specific attention in the audit design. By default, Kubernetes stores Secrets unencrypted in etcd, so anyone who can read etcd data or its snapshots can read the values. Encryption at rest protects etcd and the backups taken from it, and it should be confirmed for the distribution you run. Least-privilege RBAC that restricts list and watch access matters just as much for logging, because a list request on Secrets returns full values through the API. Set the audit policy so that request and response bodies for Secrets are not written in plain form, and confirm that the policy still records who read or changed them. Where Secrets come from an external store, confirm that store's own audit trail as well.

The last decision is where the logs go. Audit records kept only on a control plane node are hard to protect and easy to lose when a node fails or is rebuilt. Confirm that the cluster forwards audit logs to a central store with retention and tamper protection that meets requirement 10.2 and the other logging requirements in the standard, and confirm the retention period with your assessor and your own policy rather than assuming a default. Test the chain end to end by making a change as a named user and locating the record in the central store. DeployOpen can prepare the configuration and the evidence for this, but the assessor decides whether the controls meet the standard.

Evidence a QSA will ask for and how to keep it current

Assessors and internal reviewers test segmentation and logging against records as well as live settings. The cards below list the artifacts most often requested, how to refresh each one on a schedule, and which team should own it. Confirm the exact evidence set with your QSA before you assemble it.

Network and data-flow diagrams

Requirement 1.2 calls for an accurate network diagram and an accurate data-flow diagram showing how cardholder data enters, moves through and leaves the cluster. Generate the cluster view from current namespaces, services and ingress rules, then reconcile it against the cardholder data environment boundary you have defined. Review both diagrams at every approved change and at each scheduled ruleset review. Owner: network or security architecture.

NetworkPolicy set with Git history

Export the live NetworkPolicy objects on a schedule, for example with a read-only job that writes YAML to a central location, and diff the output against the approved repository. Any drift between the cluster and the approved Git state is a change to investigate. Keep the commit history and pull request approvals, since they show who approved each ruleset. Owner: platform engineering, with security reviewing the ruleset.

Change control records linked to commits

Requirement 1.2.2 requires changes to network connections and NSC configurations to go through the change control process defined in Requirement 6.5.1. Link each pull request or merge to a change ticket, and make the ticket reference a required field in the pull request template. Check periodically that no policy change reached the cluster without a linked approval. Owner: change manager or release lead.

Cluster authentication configuration

Record how users and automation authenticate to the API server, whether through client certificates, bearer tokens, OpenID Connect or a webhook. Keep the API server configuration, the OIDC issuer and client settings, and the RBAC bindings that map identities to roles. Re-export this set after each control plane change and review who holds cluster-admin. Owner: identity team, with the cluster administrators.

Audit logs, retention and access records

Keep the API audit policy file, the audit backend configuration, and sample entries showing the fields your team maps to Requirement 10.2.2, such as event type, date and time, outcome, origin and the affected resource. Retain the log retention settings and a record of who accessed the log store. Re-sample entries after each policy change and confirm the field mapping with your QSA. Owner: security operations, with platform engineering for the audit configuration.

Encryption at rest for Secrets

Keep the EncryptionConfiguration that sets encryption at rest for Secrets in etcd, along with the key provider settings and key rotation records. Kubernetes stores Secrets unencrypted in etcd by default, so the configuration and a test result showing that Secret values are not readable in plain form from etcd are the evidence to retain. Repeat the test after each control plane upgrade. Owner: platform engineering, with the key custodian.

What Kubernetes does not cover for PCI DSS, and who must close each gap

A Kubernetes cluster can enforce network policies and produce API audit logs, but it does not make a payment environment compliant on its own. The platform does not define the cardholder data environment (CDE) or its scope. Under the PCI SSC glossary, the CDE covers the people, processes and system components that store, process or transmit cardholder data or sensitive authentication data, plus any component with unrestricted connectivity to them. The entity must draw that boundary from its own network and data-flow diagrams under Requirement 1.2. Kubernetes also does not decide which entity must validate. The payment brands make that decision, and the PCI SSC does not enforce compliance. Finally, the platform does not issue a Report on Compliance or an Attestation of Compliance. A Qualified Security Assessor produces the ROC, and the entity signs an AOC on the official template.

Most of the standard sits outside network controls and logging. Kubernetes gives no protection for cardholder data beyond what you configure. Secrets are stored unencrypted in etcd by default, so encryption at rest for Secrets must be enabled, but that is one control among many. The entity still owns encryption of cardholder data in databases, object storage and backups, vulnerability management, access reviews for people across identity providers and applications, incident response, and the other principal requirements in the twelve-requirement set. Platform engineers can supply evidence for some of these, such as RBAC bindings and audit records, but the control owners are the security, application, HR and operations teams that run those processes. Name an owner for each requirement in a gap register before the assessment starts.

Several scope questions need written answers from your QSA before you design the cluster. First, confirm whether the chosen CNI enforces the NetworkPolicy objects you plan to use as network security controls, because a policy the data plane does not enforce gives no segmentation evidence. Second, decide whether shared components fall in scope: ingress controllers, service meshes, node access paths and the kube-apiserver itself. Each of these can route or read cardholder traffic, or control the policies that define segmentation. Third, confirm how logs from nodes and from applications that write outside the API server are collected, retained and reviewed. Requirement 10.2.1 applies to all system components, so API audit logs alone may not cover the environment. Record each answer with the assessor's name and the date it was given.

Where a requirement cannot be met as written, PCI DSS v4.x offers two routes that teams often confuse. A compensating control is a different mechanism used when a defined requirement cannot be met for a documented, legitimate technical or business reason. A customized approach, available to entities with strong security and risk management, meets the stated objective of a requirement in a different way and is documented against that objective. Your assessor decides whether a customized approach applies to a given item and whether a proposed compensating control is acceptable, so raise both early. The items most likely to need one are the shared components and log sources listed above, if they cannot be enrolled in the design as planned.

Close each gap by assigning it to one owner. The platform or cluster team owns NetworkPolicy configuration, CNI selection, audit policy and the policy-as-code repository. Changes to these belong in the change control process defined in Requirement 6.5.1, as Requirement 1.2.2 expects. The security team owns the scope statement, the network and data-flow diagrams and the gap register. Application and data owners own encryption of cardholder data outside the cluster. The QSA validates the evidence and produces the ROC, while the payment brands and acquirer determine which validation applies to your entity. Ask your implementation partner for a written responsibility matrix that maps each sub-requirement to one owner, one piece of evidence and one review date before any cluster is built.

Configuration sequence for a PCI DSS segmentation and logging baseline

This sequence takes a self-managed Kubernetes cluster from an undefined scope to a baseline that supports network segmentation, access control, change control and audit logging for cardholder data workloads. Each step ties to a PCI DSS v4.0.1 requirement and closes with a check or artifact for the evidence set. DeployOpen prepares these controls and evidence, while the QSA or SAQ assessor decides whether they meet the requirements.

  1. Confirm the CDE boundary and diagrams with the QSA

    Before any configuration, agree the cardholder data environment boundary with your Qualified Security Assessor, or with the assessor you plan to use if scoping is still open. Document the network diagram and the data-flow diagram that Requirement 1.2 requires, showing which namespaces, nodes, clusters, registries, logging sinks and administrative paths store, process, transmit or could affect cardholder data. Include any cluster that shares nodes, networks or identity with the CDE, because those connections define the boundary. The output is a scope statement and diagrams, approved in writing, that every later step references.

  2. Build a conformant cluster with named user access

    Select a distribution listed in the CNCF Certified Kubernetes conformance program and confirm its Kubernetes version and support window before installation. If your platform team builds the cluster itself, follow the kubeadm high availability guide: at least three control plane nodes, a TCP load balancer in front of kube-apiserver on port 6443, and an etcd topology with a backup plan from day one. For air-gapped sites, pull the control plane images into a private registry and point kubeadm init at it. Connect an identity provider so every administrator signs in as a named individual, which supports the unique-identifier expectations in Requirement 8. Done when each administrative login maps to one person and no shared credentials remain.

  3. Set Pod Security and RBAC for cardholder namespaces

    Create dedicated namespaces for cardholder workloads and label each with a Pod Security Admission level, typically Restricted for application pods and Baseline only where a documented workload needs it. Grant access through namespace-scoped roles bound to named groups, and limit cluster-admin to a small break-glass group. Disable automatic mounting of service account tokens in pods that never call the Kubernetes API. Requirement 7 expects access to be limited to what each job needs, and these settings are the Kubernetes mechanism for it. The output is a role inventory and a test showing that a developer identity cannot create privileged pods or change RBAC in the CDE namespaces.

  4. Encrypt Secrets at rest and limit read access

    Enable encryption at rest for Secrets in etcd by configuring an encryption provider on the API server, with keys held in a KMS provider or managed key store that your key management process controls. Kubernetes stores Secrets unencrypted in etcd by default, so this step is needed before any cardholder credentials reach the cluster. Restrict get, list and watch on Secrets to the workloads and groups that require them, because list and watch can expose every value in a namespace. Where credentials must live outside the cluster, plan an external store such as the Secrets Store CSI Driver. The output is a verified encryption check on a test Secret and an RBAC review with no broad list or watch grants.

  5. Apply default-deny policies and confirm CNI enforcement

    Apply a default-deny ingress and egress NetworkPolicy to each CDE namespace, then add explicit allow rules for the flows shown in the data-flow diagram, such as the payment service to its database and the ingress controller to the front end. Requirements 1.3.1 and 1.3.2 call for inbound and outbound CDE traffic to be limited to what is necessary, with all other traffic specifically denied. The Kubernetes API accepts NetworkPolicy objects whatever network plugin runs, so confirm that your CNI enforces them by testing a blocked connection between two pods. Also verify that the CNI supports every selector you rely on. The output is a policy set in the repository and test results showing each allowed flow passes and each other flow fails.

  6. Move policy and cluster configuration into version control

    Store every namespace, RBAC binding, Pod Security label, NetworkPolicy, encryption configuration and audit policy file in a Git repository, and deploy from it through a GitOps controller or a pipeline. Protect the main branch with required reviews from someone outside the author's team, and remove standing human write access to production CDE namespaces so that changes flow through the repository. Requirement 1.2.2 requires changes to network connections and NSC configurations to go through the change control process in Requirement 6.5.1. The SAQ D notes also treat these files as configuration to be secured and kept consistent with the live state. The output is a history in which each live change traces to an approved merge, plus a drift report comparing the cluster with the repository.

  7. Configure API audit policy and forward logs securely

    Write an audit policy that records request metadata for the cardholder namespaces, records authentication events and RBAC changes, and avoids logging Secret payloads by using the Metadata level for Secrets. Enable it on kube-apiserver with the audit log path and rotation settings your platform requires. Ship the audit log off the node to a store that cluster administrators cannot modify, with access separated from cluster administration, and set retention to the period confirmed with your QSA under Requirement 10. Requirement 10.2.1 requires audit logs to be enabled for all system components and cardholder data, and Requirement 10.2.2 expects each entry to show event type, time, outcome, origin and affected resource. The output is a sample entry for a denied request and a retention setting visible in the log store.

  8. Test denials and log entries, then collect evidence

    Run a scripted test set against the baseline: connection attempts from outside the CDE, from a non-approved namespace and from a pod requesting a forbidden privilege, plus an unauthorized RBAC change. For each attempt, confirm that the request is blocked and that a matching entry appears in the protected log store with the required fields. Repeat the tests after any change to policy or cluster configuration. Then assemble the evidence set: the approved scope and diagrams, conformance and version records, RBAC and Pod Security exports, NetworkPolicy test output, the Git history with approvals, the audit policy, log retention settings and the test results. The QSA decides whether this evidence is sufficient, and the Report on Compliance or SAQ with its Attestation of Compliance remains the assessor's document.

Common questions about PCI DSS, Kubernetes segmentation and audit logging

What drives effort and cost? The main drivers are the size of the cardholder data environment (CDE) and the number of clusters and namespaces inside it. Each namespace that hosts a cardholder data workload needs its own NetworkPolicy objects, Pod Security Admission labels, RBAC bindings and log routing, so a three-cluster estate with shared services in the CDE is a different job from one cluster with two namespaces. Other drivers are how mature your change control already is for network security controls under Requirement 1.2.2, whether policy changes move through reviewed Git commits or are applied by hand, and how far the logging pipeline must go to meet the retention and review expectations of Requirement 10. The QSA's stated evidence requirements also add scope, so ask for them early. Ask any provider to price these drivers separately in a written quote.

What does the work need from our side? Plan for named owners in four roles: a CDE owner who accepts scope decisions, a platform engineer with administrative access to the cluster, a repository owner who controls the policy-as-code repository and its branch protection, and a security or compliance lead who speaks to the QSA. Access must be concrete. The team needs read access to the API server audit policy, the ability to export current NetworkPolicy objects and namespace labels, and access to the Git history that serves as change approval. The QSA's written expectations should arrive before design starts, covering which samples they will take, how they will check the network and data-flow diagrams required under Requirement 1.2, and what they accept as evidence. Changes to those expectations late in the project usually mean rework, so record them in the scope document.

Can an internal team do this alone? Often yes, if the team already runs Kubernetes in production, owns a GitOps pipeline and has someone who has been through a PCI DSS assessment before. The gaps usually sit in the parts that are easy to skip: documenting which NSC rules support each approved service, port and protocol, keeping policy files under the same change control as application code, and proving that API audit logs capture the events listed under Requirement 10.2.1 with the fields described in Requirement 10.2.2. Teams without a recent assessment tend to underestimate evidence work. Decide early which parts you will staff internally and which you will hand to a partner, whether that is planning, build, or an independent review of the evidence pack, and write that split into the scope.

How long will it take? No supplied figure gives a reliable duration for this work, so do not rely on an estimate from us or anyone else until it appears in a written scope. A quote should state the phases, the environments covered, the deliverables, the dependencies on your QSA and change calendar, and what happens if the assessment date moves. Ask for the timeline split between design, build and evidence collection, along with the assumptions behind each part. Does DeployOpen certify the result? No. DeployOpen plans and builds the controls, prepares the configuration, documentation and evidence, and supports your team through the assessment. A Report on Compliance is completed by a Qualified Security Assessor, validation is documented on an Attestation of Compliance, and certificates are not recognized as validation. The payment brands decide which entities must validate.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.