GDPR Article 32 and Kubernetes: which controls policy can enforce

GDPR Article 32 asks controllers and processors for security measures appropriate to the risk. It names no Kubernetes setting. An admission policy can enforce the pod and RBAC measures that map to it. Secret encryption at rest, audit logging, restore procedures and risk assessment live in cluster configuration or in people’s work, so a policy cannot confirm them.
What Article 32 asks for
Article 32 sits in the section on security of personal data. Its first paragraph reads:
- Taking into account the state of the art, the costs of implementation and the nature, scope, context and purposes of processing as well as the risk of varying likelihood and severity for the rights and freedoms of natural persons, the controller and the processor shall implement appropriate technical and organisational measures to ensure a level of security appropriate to the risk, including inter alia as appropriate:
(a) the pseudonymisation and encryption of personal data;
(b) the ability to ensure the ongoing confidentiality, integrity, availability and resilience of processing systems and services;
(c) the ability to restore the availability and access to personal data in a timely manner in the event of a physical or technical incident;
(d) a process for regularly testing, assessing and evaluating the effectiveness of technical and organisational measures for ensuring the security of the processing.
The four points are examples, introduced by “including inter alia as appropriate”. The article does not list controls, products or settings.
What Article 32 says about risk and people
Paragraph 2 says the level of security must account for risks such as “accidental or unlawful destruction, loss, alteration, unauthorised disclosure of, or access to personal data”. Paragraph 4 covers people, and it is the part of the article a cluster’s RBAC configuration touches most directly:
- The controller and processor shall take steps to ensure that any natural person acting under the authority of the controller or the processor who has access to personal data does not process them except on instructions from the controller, unless he or she is required to do so by Union or Member State law.
This guide maps measures to Kubernetes features. It does not say which measures your organisation needs. That depends on your processing and your risk, and those judgments belong to your data protection team.
How this guide labels each measure
Each measure gets one of three labels. The label describes what a check can see, not how much the measure matters.
- Enforceable at admission. A policy can read the field that shows the measure when an object is created or updated, and reject the object if it fails.
- Enforceable in CI only. A pipeline step can fail a build or release, but the cluster never sees the check.
- Not enforceable by policy. The measure is a setting on the control plane, a process, a record or a decision. A policy on objects cannot confirm it.
Article 32 measures mapped to Kubernetes controls
The table covers each paragraph of Article 32 that describes a measure. The Kubernetes column names features from the kubernetes.io pages cited below. The labels are this guide’s classification of those features.
| Article 32 | Measure, paraphrased | Kubernetes control | Label | Why |
|---|---|---|---|---|
| 32(1)(a) | Pseudonymisation of personal data | None. It is a design choice in the application’s data model | Not enforceable by policy | No Kubernetes object carries it |
| 32(1)(a) | Encryption of stored Secret data | Encryption at rest with an EncryptionConfiguration on kube-apiserver | Not enforceable by policy | Set on the API server. Admission sees the request, not how etcd stores it |
| 32(1)(b) | No privileged containers, host namespaces, hostPath volumes or added capabilities | Pod Security Admission at the restricted level, in enforce mode | Enforceable at admission | The fields sit in the pod spec being admitted |
| 32(1)(b) | Least privilege for access to systems | RBAC: namespace RoleBindings, no wildcard rules, no cluster-admin bindings | Enforceable at admission | A policy can refuse the RBAC objects that grant these. The access itself is enforced by RBAC |
| 32(1)(b) | Isolation of network traffic | NetworkPolicy with a default-deny policy per namespace | Enforceable in CI only | A pipeline can fail when a namespace has no default-deny policy. The network plugin enforces the traffic, and admission cannot see that |
| 32(1)(c) | Timely restoration after a technical incident | Backup and restore procedures, tested | Not enforceable by policy | A process. No admission request carries it |
| 32(1)(d) | Regular testing of the policy files | Policy test suites run in the pipeline | Enforceable in CI only | The tests run before deployment, against the files |
| 32(1)(d) | Regular testing and evaluation of the organisation’s measures | Assessment and review process | Not enforceable by policy | A people process with records |
| 32(1)(d) | Records of what was done to the API server | API server audit logging, set with –audit-policy-file | Not enforceable by policy | If the flag is omitted, no events are logged. A policy cannot see whether the flag is set |
| 32(2) | Account for risks of loss, alteration or unauthorised access | Risk assessment | Not enforceable by policy | A decision, recorded by people |
| 32(3) | Approved code of conduct or certification as evidence | None | Not enforceable by policy | An external certification process |
| 32(4) | Access to personal data limited to people acting under authority | RBAC rules for get, list and watch on Secrets | Enforceable at admission | A policy can refuse bindings that give broad Secret reads. Who reads is decided by RBAC |
| 32(4) | Processing only on the controller’s instructions | None | Not enforceable by policy | The instructions are documents and decisions |
The rows that a policy can act on are the admission rows. They are the ones to start with, but they cover the least of the article. Most of Article 32 sits in the rows marked not enforceable by policy. The same labelling method is used in our posts on RBAC for AI agents in Kubernetes and Pod Security Admission levels for AI agent workloads.
Pod settings: Pod Security admission at the restricted level
Pod Security admission is built into the API server, and it applies the Pod Security Standards at namespace level when pods are created. The restricted level covers the controls that matter most for Article 32(1)(b): privileged containers, host namespaces, hostPath volumes, added capabilities, privilege escalation, a non-root user and a seccomp profile. Each mode is set with a namespace label:
# The per-mode level label indicates which policy level to apply for the mode.
# MODE must be one of `enforce`, `audit`, or `warn`.
# LEVEL must be one of `privileged`, `baseline`, or `restricted`.
pod-security.kubernetes.io/<MODE>: <LEVEL>
# Optional: per-mode version label that can be used to pin the policy to the
# version that shipped with a given Kubernetes minor version.
pod-security.kubernetes.io/<MODE>-version: <VERSION>
To roll it out without breaking workloads:
- Set
warnandaudittorestrictedon the namespace. The page sayswarnshows a user-facing warning andauditadds an annotation to the audit event, and both allow the pod. - Read the warnings for each Deployment, Job and bare Pod in the namespace. The page says Pods are often created indirectly, and that audit and warn modes help catch violations early on workload resources that define a pod template.
- Fix each pod template that violates the level, then set
enforcetorestricted. From then on, a violating pod is rejected.
Exemptions need care. The page says they must be explicitly enumerated, and that requests from an exempt username, runtime class or namespace are ignored by the admission controller. An exempt namespace is a gap, so record each exemption with an owner.
Access to Secrets: RBAC and Article 32(4)
RBAC good practices ask for namespace-level RoleBindings instead of ClusterRoleBindings, no wildcard permissions where possible, and no use of cluster-admin except where it is needed. A policy can enforce the object-level part of this. It can refuse a Role or binding that uses a wildcard, binds cluster-admin, or grants the escalate, bind or impersonate verbs that the RBAC docs list as privilege escalation risks.
The docs also say that Secret access is wider than it looks. Granting list access to Secrets lets the subject fetch their contents. And a user who can create a Pod that uses a Secret can see that Secret’s value, even when RBAC denies a direct read. A policy that limits which Pods may mount which volumes covers part of that gap. The rule that only the controller’s instructions govern processing, from Article 32(4), is not a Kubernetes check and stays in the not-enforceable rows.
Encryption of stored Secrets
Secret objects are stored unencrypted in etcd by default. Encryption at rest is set on the API server with --encryption-provider-config, which points at an EncryptionConfiguration file. Article 32(1)(a) names encryption of personal data, and a Secret can hold personal data, so this row applies only where it does. A policy cannot see the setting, so the label is not enforceable by policy.
Encryption applies to new writes. The encryption page says it is “often not enough to make sure that new objects get encrypted”, and that existing objects need a replace to be re-stored. The docs give this command, which an administrator who can read and write all Secrets runs:
kubectl get secrets --all-namespaces -o json | kubectl replace -f -
The page says the command is safe to run more than once, and that a conflicting write means you should retry. Check the first provider in your EncryptionConfiguration before you rely on it. The page says that when the first provider is identity, Secrets are not encrypted.
Network isolation
A NetworkPolicy isolates a pod only once a policy selects it. Until then, the pod accepts and sends all traffic. The docs say that policies are additive, and that the cluster must use a network plugin that supports NetworkPolicy enforcement. The docs say the network plugin implements these objects, so the cluster has to run one that does.
A common starting point is a default-deny policy in each namespace, then explicit allow rules:
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-all
spec:
podSelector: {}
policyTypes:
- Ingress
- Egress
Use CI to fail a build when a namespace in the rendered manifests has no default-deny policy. That check can run before deployment, but it cannot show that the plugin enforces the policy. Article 32(1)(b) speaks of confidentiality and integrity, so this row supports the article rather than meeting it alone.
Audit trail and testing
Article 32(1)(d) asks for a process of regular testing. Two things belong in the cluster: an audit trail of what changed, and a test of the policy files that enforce the other controls. The audit trail depends on the API server flag. The audit page says that if --audit-policy-file is omitted, no events are logged, and that the policy file must include a rules field.
# Log all requests at the Metadata level.
apiVersion: audit.k8s.io/v1
kind: Policy
rules:
- level: Metadata
The page defines four levels: None, Metadata, Request and RequestResponse. Metadata records the requester, the time and the resource, without bodies. RequestResponse records request and response bodies, so check what those bodies hold before you choose it for Secret or personal-data resources.
Policy test suites in CI are enforceable in CI only. They show that the policy files pass their tests. They do not show that the API server runs with the audit flag, and they do not test whether your organisation’s measures work. That is a process, and it is labelled not enforceable by policy.
Gotchas from the fine print
- Article 32 is not a control list. Every Kubernetes mapping here is ours. When you publish one, cite the paragraph and the measure, and say the mapping is your own reading.
- Pod Security admission checks the object at admission. It does not inspect what runs inside the container image, so image content stays out of the restricted row.
- Exemptions skip the check. The page says exempt requests are ignored, so an exemption is a gap that needs an owner and a review date.
- Encryption covers new writes first. Existing Secrets stay as they were until they are replaced, so run the replace step and check the result.
- RBAC is not a data-protection control on its own. It limits who can read, but anyone who can create a pod that mounts a Secret can read its value.
- NetworkPolicy needs a plugin that enforces it. The docs say the network plugin implements these objects. Confirm that yours does before you count the row as done.
A checklist before you map Article 32
- Cite Regulation (EU) 2016/679, Article 32, the EUR-Lex text you read and the date you read it.
- Label each measure with one of the three classes, and write down why.
- For each admission row, run the policy in audit or warn mode, then enforce it once the reports are clean.
- For each CI row, add the check to the pipeline, then confirm it fails on a deliberately bad change in a test branch.
- For each remaining row, name the record that holds the evidence, and the person who keeps it.
- Have your data protection team review the mapping before anyone describes it externally.
Enforcing this with Kyverno
The rows marked enforceable at admission are the ones an admission policy can act on, whichever tool you use. For the wider approach to evidence for audits, read the continuous compliance hub. For the open-source Kyverno project, read the Kyverno page. For the same method applied to other frameworks, read the posts on how to collect Kubernetes compliance evidence for auditors and NIST SP 800-218 and Kubernetes.
Sources checked on 2026-11-22: Regulation (EU) 2016/679 on EUR-Lex, and the Kubernetes pages on Pod Security Admission, Pod Security Standards, RBAC good practices, the RBAC reference, Good practices for Secrets, Encrypting Confidential Data at Rest, Network Policies and Auditing.
Frequently asked questions
Does GDPR Article 32 mention Kubernetes or named security controls?
No. Article 32 asks controllers and processors to implement appropriate technical and organisational measures for a level of security appropriate to the risk. It gives four examples: pseudonymisation and encryption, confidentiality and resilience, timely restoration, and regular testing. It names no product, cluster setting or Kubernetes feature. Any mapping to Kubernetes is an interpretation, and your organisation should own and document it.
Which Article 32 measures can an admission policy enforce?
The ones that appear in the object being created or updated. Pod settings such as privileged containers, host namespaces, hostPath volumes and added capabilities can be checked at admission, and so can some RBAC grants. Encryption of Secrets in etcd, audit logging and restore procedures are set on the control plane or run as processes, so a policy cannot confirm them from an admission request.
Does enforcing these Kubernetes controls make a cluster GDPR compliant?
No. A control that a policy enforces shows that one technical measure applies to the objects the policy can see. It does not assess risk, does not cover how an application handles personal data, and does not establish compliance. Article 32 also depends on a risk assessment and on your processing. Take those decisions to your data protection team and legal advisers.
Are Kubernetes Secrets encrypted at rest by default?
No. The Kubernetes Secrets guidance says Secret values are stored unencrypted in etcd by default. Encryption needs an EncryptionConfiguration passed to kube-apiserver with --encryption-provider-config, and the first provider in its list must not be identity. Secrets that were stored before encryption was enabled are not rewritten automatically, so the docs describe a replace operation to re-store them.