CertGrid CertGrid
Hands-on Lab·Certified Kubernetes Security Specialist

Encrypting Secrets at Rest in etcd

Secrets are base64 in the API and plaintext in etcd, and turning that off means editing the apiserver. This guide does it on a real control plane, proves it from inside etcd, and then finds the Secrets that encryption did not touch.

Microservice Vulnerabilities Guide 20 of 40 Advanced

Written against the versions above. Run on cka8001, the single-node cluster this path uses for control-plane changes. The manifest was backed up first and restored at the end, and the test namespace was deleted before the revert.

Every command on this page ran on cka8001.
Server NameIP AddressOSRolesCPURAMHDD
CKA8001192.168.0.56Ubuntu 26.04 LTSSingle Node (control plane, untainted)2 Core4 GB50 GB

Before you start

  1. What a Secret looks like in etcd

  2. The configuration, and the flag that loads it

  3. The new Secret, and the old one

  4. Rewrite what is already there

Official sources