Created on 2026-12-01
Kubernetes Hardening L3: Control Plane, etcd mTLS, KMS v2 Encryption, and Structured Auth
TL;DR: The Kubernetes control plane (kube-apiserver, etcd, kube-controller-manager, kube-scheduler) is the brain and vault of your cluster. Whoever reads etcd owns every Secret across every namespace; whoever bypasses kube-apiserver authentication owns the platform. On managed clouds, the provider operates etcd and the API server binary, yet critical controls - such as EKS control-plane audit logs and Customer-Managed Encryption Keys (CMEK) - still require explicit configuration. On bare metal, you own the entire stack: Structured Authentication Configuration (apiserver.config.k8s.io/v1, GA in Kubernetes 1.34), health-only anonymous endpoints (KEP-4633, GA in Kubernetes 1.34), KMS v2 envelope encryption backed by an external Key Encryption Key (OpenBao/Vault Transit or HSM), a dedicated etcd CA with strict peer/client mTLS, and a leak-free AuditPolicy.
The Premise: etcd Is Equivalent to cluster-admin
In Kubernetes, all cluster state lives in etcd. That includes every Secret, every ConfigMap, and every RBAC ClusterRoleBinding. If an attacker can reach port 2379 with a valid client certificate - or read an unencrypted etcd snapshot or disk block - they bypass kube-apiserver RBAC and audit logging completely.
Meanwhile, kube-apiserver is the single front door for humans, controllers, and kubelets. Historically, configuring authentication and encryption on kube-apiserver meant juggling dozens of brittle CLI flags (--oidc-issuer-url, --anonymous-auth) that only supported a single OIDC provider and required restarting the API server on every change. Between Kubernetes 1.29 and 1.37, upstream Kubernetes replaced those legacy flags with Structured Authentication Configuration, configurable anonymous endpoints (KEP-4633), and KMS v2 envelope encryption.
Managed (EKS / GKE / AKS) vs. Self-Hosted Bare Metal
On managed Kubernetes, you cannot pass arbitrary flags to etcd or edit /etc/kubernetes/manifests/kube-apiserver.yaml. Instead, the cloud provider exposes specific API knobs for encryption, OIDC authentication, and audit logging.
Important: Managed does not mean "secure by default." On AWS EKS, all five control-plane log types (
api,audit,authenticator,controllerManager,scheduler) are disabled by default to save CloudWatch ingestion costs. If an attacker compromises an EKS cluster with default logging settings, you have zero API server audit trail.
| Control Plane Capability | AWS EKS | Google GKE | Azure AKS | Self-Hosted Bare Metal |
|---|---|---|---|---|
| Control-Plane Audit Logs | Off by default - must explicitly enable api, audit, authenticator in enabled_cluster_log_types |
Admin Activity logs always on; Data Access logs (reads) opt-in via Cloud Audit Logs | Off by default - must configure Azure Monitor Diagnostic Settings (kube-audit-admin) |
You own it: Custom AuditPolicy YAML + Fluent Bit (CNCF Graduated) / OpenTelemetry Collector (CNCF Graduated) shipping off-cluster |
etcd Encryption at Rest |
Envelope encryption enabled by default on new clusters; bring your own AWS KMS CMK for dual-gate control | Disk encryption default; enable Application-layer Secrets Encryption with Cloud KMS CMEK | Disk encryption default; enable KMS etcd encryption backed by Azure Key Vault | You own it: EncryptionConfiguration (apiserver.config.k8s.io/v1) with KMS v2 gRPC plugin -> OpenBao / Vault Transit or HSM |
| Multi-Issuer OIDC / Structured AuthN | EKS OIDC identity provider associations + EKS Access Entries | GKE Identity Service / Workforce Identity Federation | Microsoft Entra ID integration + --disable-local-accounts |
You own it: AuthenticationConfiguration (apiserver.config.k8s.io/v1, GA in 1.34) with CEL claim rules + dynamic reload |
| Anonymous Endpoint Restriction | Managed by AWS (restricted on recent versions) | Managed by GCP | Managed by Azure | You own it: AnonymousAuthConfigurableEndpoints (KEP-4633, GA in K8s 1.34) |
etcd Isolation & PKI |
Provider-managed (isolated VPC, dedicated PKI) | Provider-managed (Spanner/Borg-backed on Autopilot/Regional) | Provider-managed | You own it: Dedicated VLAN (2379/2380), separate etcd-ca, peer/client mTLS, encrypted off-site snapshots |
Enabling the Missing Controls on Managed EKS
Here is the production Terraform configuration required to turn on EKS control-plane audit logging and bind etcd envelope encryption to a Customer-Managed KMS Key (CMK):
resource "aws_eks_cluster" "hardened_cp" {
name = "prod-eks"
role_arn = aws_iam_role.eks_cp.arn
version = "1.36"
# 1. CRITICAL: Enable all 5 control-plane log streams (off by default in EKS)
enabled_cluster_log_types = [
"api",
"audit",
"authenticator",
"controllerManager",
"scheduler"
]
# 2. Envelope encrypt Kubernetes Secrets in etcd using a dedicated KMS CMK
encryption_config {
provider {
key_arn = aws_kms_key.eks_etcd_secrets.arn
}
resources = ["secrets"]
}
vpc_config {
subnet_ids = var.private_cp_subnet_ids
endpoint_private_access = true
endpoint_public_access = false
}
}
KMS v2 Envelope Encryption: Why Local aescbc Is Security Theater
When teams first read the Kubernetes documentation on "Encrypting Confidential Data at Rest," they often configure the aescbc or secretbox provider inside /etc/kubernetes/enc/encryption-config.yaml with a base64-encoded 32-byte key on the control-plane node's filesystem.
This fails basic threat modeling. The static AES key in /etc/kubernetes/enc/encryption-config.yaml lives on the exact same control-plane disk (and inside the same VM snapshot or bare-metal backup) as /var/lib/etcd/member/snap/db. Anyone who steals the disk image or gains host read access gets both the lock and the key simultaneously.

How KMS v2 Works
Real encryption at rest requires Envelope Encryption configured through EncryptionConfiguration (apiserver.config.k8s.io/v1) and a KMS v2 gRPC plugin implementing k8s.io/kms/apis/v2 (GA since Kubernetes 1.29; KMS v1 was deprecated in 1.28 and disabled by default since 1.29):
- Key Hierarchy Separation:
kube-apiservergenerates a local Data Encryption Key (DEK) seed in memory to encrypt individual KubernetesSecretandConfigMapobjects using AES-GCM. - External KEK Wrapping:
kube-apiserversends the DEK over a local UNIX domain socket (unix:///var/run/kmsplugin/openbao-kms.sock) to a KMS v2 gRPC plugin. The plugin calls an external Key Management Service - AWS KMS, GCP Cloud KMS, Azure Key Vault, an OpenBao (Linux Foundation / OpenSSF Vault fork) Transit Engine running in an isolated security enclave, or a PKCS#11 Hardware Security Module (HSM) - to encrypt the DEK with a non-exportable Key Encryption Key (KEK). - High Performance at Scale: Unlike legacy KMS v1 (which made a network call per Secret and required restarting
kube-apiserveron key rotation), KMS v2 uses a local key hierarchy seed to derive per-object DEKs without hitting the network on every write, and supports seamless in-place KEK rotation viakey_idstate tracking.
Here is a production EncryptionConfiguration using KMS v2 backed by an external OpenBao Transit / HSM plugin:
# /etc/kubernetes/enc/encryption-config.yaml
apiVersion: apiserver.config.k8s.io/v1
kind: EncryptionConfiguration
resources:
- resources:
- secrets
- configmaps
providers:
- kms:
apiVersion: v2
name: openbao-transit-kek
endpoint: unix:///var/run/kmsplugin/openbao-kms.sock
timeout: 3s
# Identity (plaintext) sits LAST only so existing unencrypted objects can be read during initial migration
- identity: {}
After enabling KMS v2 or rotating the external KEK, re-encrypt all existing Secret and ConfigMap objects in etcd so zero plaintext (identity) records remain on disk. Skip immutable: true objects in automated rewrites (Kubernetes rejects in-place replace on immutable Secrets/ConfigMaps, so recreate them during a planned maintenance window) and log any concurrent 409 Conflict retries:
# Re-encrypt all mutable Secrets and ConfigMaps across all namespaces under the active KMS v2 KEK
for kind in secrets configmaps; do
kubectl get "$kind" --all-namespaces -o json \
| jq -c '.items[] | select(.immutable != true)' \
| while read -r obj; do
printf '%s\n' "$obj" | kubectl replace -f - \
|| echo "Retry needed: $kind/$(printf '%s' "$obj" | jq -r '.metadata | "\(.namespace)/\(.name)"')"
done
done
Verify directly in etcd that the stored value begins with the k8s:enc:kms:v2: prefix rather than plaintext protobuf:
ETCDCTL_API=3 etcdctl \
--endpoints=https://10.20.0.11:2379 \
--cacert=/etc/kubernetes/pki/etcd/ca.crt \
--cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt \
--key=/etc/kubernetes/pki/etcd/healthcheck-client.key \
get /registry/secrets/default/my-app-secret -w fields | grep '"Value"'
# Output must start with: "k8s:enc:kms:v2:openbao-transit-kek:..."
Structured Authentication Configuration & KEP-4633 Health-Only Anonymous Auth
Two major upstream Kubernetes enhancements have transformed kube-apiserver authentication hardening:
- Structured Authentication Configuration (
--authentication-config, Beta in 1.30 asv1beta1, GA in 1.34 asv1): Replaces the rigid--oidc-*CLI flags with a dynamically reloaded YAML configuration (apiserver.config.k8s.io/v1) that supports multiple JWT issuers simultaneously (for example, corporate Okta / Entra ID / Keycloak [CNCF Incubating] for human engineers and GitHub Actions / GitLab OIDC for CI/CD runners) and uses Common Expression Language (CEL) to validate claims, block unverified email accounts, and prefix usernames/groups to prevent privilege spoofing. - Anonymous Auth Restricted to Health Endpoints (
AnonymousAuthConfigurableEndpoints, KEP-4633, GA in Kubernetes 1.34): Previously, operators faced an ugly dilemma: setting--anonymous-auth=falsebroke unauthenticated load-balancer health checks andkubeadmstartup probes against/healthz,/livez, and/readyz, while leaving--anonymous-auth=trueexposed the entire API discovery surface tosystem:anonymousif someone accidentally created aClusterRoleBindingreferencingsystem:anonymousorsystem:unauthenticated. With KEP-4633, you keep anonymous auth enabled strictly for/healthz,/livez, and/readyzwhile rejecting anonymous requests on every other API path before RBAC is even evaluated.

Production AuthenticationConfiguration Manifest
# /etc/kubernetes/auth/authentication-config.yaml
apiVersion: apiserver.config.k8s.io/v1
kind: AuthenticationConfiguration
# 1. KEP-4633 (GA in K8s 1.34): Permit anonymous requests ONLY to liveness/readiness probes
anonymous:
enabled: true
conditions:
- path: /healthz
- path: /livez
- path: /readyz
# 2. Multi-Issuer JWT Authentication with CEL Claim Validation
jwt:
# Issuer 1: Corporate OIDC IdP (e.g., Keycloak / Entra / Okta) for human SREs
- issuer:
url: https://sso.bard.sh/realms/platform
audiences:
- k8s-prod-cluster
audienceMatchPolicy: MatchAny
claimValidationRules:
- expression: 'has(claims.email_verified) && claims.email_verified == true'
message: "OIDC email claim must be verified."
- expression: 'has(claims.email) && claims.email.endsWith("@bard.sh")'
message: "Only bard.sh corporate domain identities are permitted."
claimMappings:
username:
expression: '"oidc:" + claims.email'
groups:
# Guard has(claims.groups) so users without group memberships do not trigger a CEL error
expression: 'has(claims.groups) ? claims.groups.map(g, "oidc:" + g) : []'
uid:
claim: sub
userValidationRules:
- expression: '!user.username.startsWith("system:")'
message: "External JWTs cannot impersonate reserved system: principals."
- expression: 'user.groups.all(g, !g.startsWith("system:"))'
message: "External JWTs cannot map to reserved system: groups."
# Issuer 2: GitHub Actions OIDC for Automated GitOps / CI Diagnostics (Read-Only)
- issuer:
url: https://token.actions.githubusercontent.com
audiences:
- k8s-prod-ci
claimValidationRules:
- expression: 'has(claims.repository_owner) && claims.repository_owner == "bard-sh"'
message: "Only workflows from bard-sh may authenticate."
- expression: 'has(claims.ref) && claims.ref == "refs/heads/main"'
message: "Only workflows running on the protected main branch may authenticate."
claimMappings:
username:
expression: '"gha:" + claims.repository + ":" + claims.actor'
groups:
expression: '["ci:github-actions"]'
Warning:
--authentication-configis mutually exclusive with the legacy--oidc-*CLI flags and with--anonymous-auth(whenanonymous:is declared in the file). Leaving any legacy--oidc-issuer-url,--oidc-client-id, or--anonymous-authflag onkube-apiservercauses startup to fail immediately.
Because kube-apiserver watches --authentication-config=/etc/kubernetes/auth/authentication-config.yaml and reloads it dynamically in-process, you can rotate OIDC issuers or tighten CEL rules without restarting the API server.
Hardening etcd and PKI on Bare Metal
On self-hosted bare metal, etcd requires four non-negotiable boundaries:
1. Dedicated PKI (etcd-ca Separate from Cluster ca.crt)
Never share the main Kubernetes cluster CA (/etc/kubernetes/pki/ca.crt) with etcd. If etcd trusts the main cluster CA for --client-cert-auth, then any valid Kubernetes client certificate (including a kubelet certificate stolen from a compromised worker node!) is accepted by etcd's TLS listener on port 2379 as an authenticated etcd client. Always use a dedicated /etc/kubernetes/pki/etcd/ca.crt that signs only the kube-apiserver-etcd-client certificate and etcd peer/healthcheck certificates.
2. Mandatory Peer and Client mTLS Bound to the Control-Plane VLAN
Configure etcd to require mutual TLS on both client (2379) and peer (2380) ports, disable automatic self-signed certs (--auto-tls=false, --peer-auto-tls=false), and bind each control-plane member exclusively to its own IP on the isolated Control-Plane VLAN (10.20.0.0/24 from Layer 1).
Keep cluster-wide etcd settings in kubeadm ClusterConfiguration, and never hardcode a single node's IP inside shared ClusterConfiguration (doing so breaks kubeadm join on control-plane nodes 2 and 3):
# Cluster-wide hardened etcd flags (kubeadm ClusterConfiguration)
# Note: Bind per-node listen-client-urls / listen-peer-urls via per-host kubeadm --patches
# (or Talos cluster.etcd.listenSubnets: ["10.20.0.0/24"]) - never hardcode one node IP here.
apiVersion: kubeadm.k8s.io/v1beta4
kind: ClusterConfiguration
etcd:
local:
extraArgs:
- name: client-cert-auth
value: "true"
- name: peer-client-cert-auth
value: "true"
- name: auto-tls
value: "false"
- name: peer-auto-tls
value: "false"
- name: trusted-ca-file
value: /etc/kubernetes/pki/etcd/ca.crt
- name: peer-trusted-ca-file
value: /etc/kubernetes/pki/etcd/ca.crt
- name: cipher-suites
value: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
# Isolate metrics to loopback so Prometheus scrapes via an authenticated local proxy
- name: listen-metrics-urls
value: http://127.0.0.1:2381
# Production stability & corruption guards: 8 GiB DB quota, hourly compaction, boot hash check
- name: quota-backend-bytes
value: "8589934592"
- name: auto-compaction-mode
value: periodic
- name: auto-compaction-retention
value: "1h"
- name: snapshot-count
value: "10000"
# etcd 3.6+ replaced deprecated --experimental-initial-corrupt-check with a feature gate
- name: feature-gates
value: InitialCorruptCheck=true
On each control-plane node (10.20.0.11, 10.20.0.12, 10.20.0.13), apply a per-host kubeadm --patches file (during InitConfiguration / JoinConfiguration) setting --listen-client-urls=https://<node-vlan20-ip>:2379,https://127.0.0.1:2379 and --listen-peer-urls=https://<node-vlan20-ip>:2380. On Talos Linux, cluster.etcd.listenSubnets: ["10.20.0.0/24"] (shown in Layer 1) configures each control-plane member's own VLAN 20 address automatically.
3. Mandatory Admission Plugins (NodeRestriction, EventRateLimit)
Ensure kube-apiserver enables:
NodeRestriction: Prevents a compromisedkubelet(authenticated assystem:node:<name>) from modifyingNodeorPodobjects belonging to other nodes, and blocks kubelets from settingnode-restriction.kubernetes.io/*labels to spoof node scheduling rules.EventRateLimit: Prevents a compromised namespace or noisy controller from floodingetcdwith thousands ofEventobjects per second and causing anetcdquota exhaustion outage.--profiling=false: Disables/debug/pprofendpoints onkube-apiserver,kube-scheduler, andkube-controller-manager.
Designing a Leak-Free Production AuditPolicy
Audit logs are your primary forensic record during an incident, but a poorly written AuditPolicy will either leak plaintext Kubernetes Secrets and minted JWTs into your logging pipeline or drown your SIEM in gigabytes of kubelet heartbeat noise.
Follow three golden rules in /etc/kubernetes/audit/audit-policy.yaml:
- Log
secrets,configmaps,serviceaccounts/token(TokenRequest), andtokenreviewsatMetadatalevel ONLY - neverRequestorRequestResponse. Loggingserviceaccounts/tokenatRequestResponsewrites every newly minted ServiceAccount JWT in plaintext into/var/log/kubernetes/audit/audit.logand your SIEM, turning read-only log access into cluster compromise. - Log high-risk operations at
RequestResponselevel: RBAC changes (roles,clusterroles,rolebindings,clusterrolebindings),pods/exec,pods/attach,pods/portforward,nodes/proxy,certificatesigningrequests, and admission policy changes. - Drop high-volume, low-value read noise:
coordination.k8s.io/leasesleader elections,/metrics, and/healthzprobes.
# /etc/kubernetes/audit/audit-policy.yaml
apiVersion: audit.k8s.io/v1
kind: Policy
omitStages:
- "RequestReceived"
rules:
# 1. Drop noisy health checks and leader-election leases
- level: None
nonResourceURLs:
- "/healthz*"
- "/livez*"
- "/readyz*"
- "/metrics"
- level: None
resources:
- group: "coordination.k8s.io"
resources: ["leases"]
# 2. CRITICAL: Log Secrets, ConfigMaps, TokenRequest (serviceaccounts/token), and TokenReviews
# at Metadata ONLY - never log plaintext secret payloads or minted JWTs!
- level: Metadata
resources:
- group: ""
resources: ["secrets", "configmaps", "serviceaccounts/token"]
- group: "authentication.k8s.io"
resources: ["tokenreviews"]
# 3. High-risk interactive & privilege-escalation paths -> Full RequestResponse
- level: RequestResponse
resources:
- group: ""
resources: ["pods/exec", "pods/attach", "pods/portforward", "nodes/proxy"]
- group: "rbac.authorization.k8s.io"
resources: ["clusterroles", "clusterrolebindings", "roles", "rolebindings"]
- group: "admissionregistration.k8s.io"
resources: ["validatingadmissionpolicies", "mutatingadmissionpolicies", "validatingwebhookconfigurations", "mutatingwebhookconfigurations"]
- group: "certificates.k8s.io"
resources: ["certificatesigningrequests", "certificatesigningrequests/approval"]
# 4. Default catch-all: Metadata for all other mutating calls
- level: Metadata
verbs: ["create", "update", "patch", "delete", "deletecollection"]
Ship /var/log/kubernetes/audit/audit.log off the control-plane nodes immediately using Fluent Bit or the OpenTelemetry Collector into an immutable, append-only SIEM bucket so an attacker who gains control-plane access cannot scrub their tracks.
Common Failure Modes & Operational Pitfalls
1. The KMS v2 Circular Dependency Deadlock on Bare Metal
What happens: You deploy OpenBao (or HashiCorp Vault) inside your bare-metal Kubernetes cluster as a StatefulSet, and configure kube-apiserver's KMS v2 plugin to use that in-cluster OpenBao instance to encrypt etcd. Following a power outage, the cluster boots: kube-apiserver cannot read etcd until OpenBao is up, and OpenBao pods cannot be scheduled or mount their Secrets until kube-apiserver can read etcd. The entire cluster is deadlocked.
How to avoid it: Your KMS v2 Key Encryption Key (KEK) authority must live outside the cluster whose etcd it encrypts - and off any worker-accessible VLAN (VLAN 30 is trunked to worker nodes in Layer 1). Deploy HA OpenBao Transit (auto-unsealed via PKCS#11 HSM or TPM 2.0) on dedicated appliances in an isolated out-of-band / KMS enclave (VLAN 10 or a dedicated KMS VRF with ToR ACLs allowing only control-plane VLAN 20 peers), in a hardware HSM, or in a cloud KMS API.
2. Setting --anonymous-auth=false Without KEP-4633
What happens: On an older cluster (or without configuring AuthenticationConfiguration), an engineer sets --anonymous-auth=false on kube-apiserver to satisfy a security scanner. External HAProxy / NLB TCP/HTTPS health checks hitting /livez or /readyz without a client certificate immediately receive 401 Unauthorized, and the load balancer marks all control-plane nodes DOWN.
How to avoid it: On Kubernetes 1.34+, remove --anonymous-auth from kube-apiserver flags, keep anonymous.enabled: true inside AuthenticationConfiguration, and restrict conditions strictly to [{path: /healthz}, {path: /livez}, {path: /readyz}] (KEP-4633).
3. Unencrypted Off-Site etcd Backups
What happens: You go to great lengths to configure KMS v2 envelope encryption for secrets and configmaps, then run a cronjob that executes etcdctl snapshot save and uploads the raw snapshot file to an S3/MinIO bucket accessible to developers. Even though Secret and ConfigMap payloads are encrypted inside the snapshot, every Deployment environment variable, CRD, and RBAC binding in that snapshot is stored in cleartext.
How to avoid it: Always encrypt the entire etcd snapshot file (age, gpg, or SSE-KMS with a restricted bucket policy) before uploading it to off-site object storage, and test snapshot restoration quarterly in an isolated environment.
Summary Checklist
Before moving up to Layer 4 (Identity, RBAC, and Workload Identity), verify your Layer 3 control plane:
- Managed Control-Plane Logs: EKS control-plane log types (
api,audit,authenticator,controllerManager,scheduler), GKE Audit Logs, or AKSkube-audit-adminenabled and shipped to SIEM. - KMS v2 Envelope Encryption:
EncryptionConfiguration(apiserver.config.k8s.io/v1) uses KMS v2 (k8s.io/kms/apis/v2) overunix:///var/run/kmsplugin/openbao-kms.sock, backed by an external KEK in Cloud KMS, a hardware HSM, or an external OpenBao Transit enclave isolated off worker VLANs (VLAN 10/ dedicated KMS VRF). - Structured AuthN & KEP-4633:
AuthenticationConfiguration(apiserver.config.k8s.io/v1, GA in 1.34) enforces CEL claim validation, guardshas(claims.groups), blockssystem:prefixes, and restricts anonymous access strictly to/healthz,/livez, and/readyzwith conflicting legacy flags removed. - Dedicated
etcdTrust Zone: Separateetcd-caPKI, mandatory peer/client mTLS (2379/2380), per-node binding toVLAN 20,--feature-gates=InitialCorruptCheck=true, and encrypted off-site snapshots. - Leak-Free Audit Policy:
secrets,configmaps,serviceaccounts/token(TokenRequest), andtokenreviewslogged atMetadataonly; RBAC,pods/exec,nodes/proxy, CSRs, and admission webhooks logged atRequestResponse.
Day-1 Verification & Operational Runbook
Run these checks immediately after deploying or updating control-plane hardening:
# 1. Confirm Secret values are KMS v2 encrypted in etcd (must show k8s:enc:kms:v2: prefix, not plaintext protobuf)
ETCDCTL_API=3 etcdctl \
--endpoints=https://10.20.0.11:2379 \
--cacert=/etc/kubernetes/pki/etcd/ca.crt \
--cert=/etc/kubernetes/pki/etcd/healthcheck-client.crt \
--key=/etc/kubernetes/pki/etcd/healthcheck-client.key \
get /registry/secrets/default/my-app-secret -w fields | grep '"Value"'
# 2. Verify KEP-4633: unauthenticated /version returns 401 while /livez returns ok
curl -k -s -o /dev/null -w "%{http_code}\n" https://<api-server>:6443/version
curl -k -s https://<api-server>:6443/livez
# 3. Verify audit logs never capture request/response bodies for secrets or TokenRequest JWTs
grep -E '"resource":"(secrets|serviceaccounts)"' /var/log/kubernetes/audit/audit.log \
| grep -E '"(requestObject|responseObject)"' | head -n 5
Key Day-2 operational practices:
- External OpenBao KMS v2 enclave & PKI separation: On bare metal, keep the HA OpenBao cluster serving
transit/encrypt/k8s-etcd-kekin an external KMS/OOB enclave (VLAN 10or a dedicated KMS VRF, never worker-trunkedVLAN 30) so control-plane cold boots never deadlock and worker nodes cannot route to the KMS authority. Keepkube-apiserver's ServiceAccount signing key (--service-account-signing-key-file) isolated on control-plane hosts (it is stored on host disk, not inetcd) and manage separateetcd-ca,kubernetes-ca, andfront-proxy-cachains. - KEK rotation & Prometheus verification: After rotating the KEK in Cloud KMS or OpenBao
transit, run thesecrets+configmapsrewrite loop (skippingimmutable: trueobjects) and verify healthy key wraps viaapiserver_envelope_encryption_key_requests_totalandapiserver_envelope_encryption_kms_operations_latency_secondsin Prometheus. - Verify managed cloud defaults in Terraform: On EKS, confirm
enabled_cluster_log_typesincludes all five streams andencryption_configbinds your KMS CMK before workloads deploy; on bare metal, run quarterlyetcdutlrestore drills from encrypted off-site snapshots in an isolated staging rack.