The private key was gone, and so was access to the cluster.
That’s how fragile Kubernetes control can be when encryption and permissions are handled without the right guardrails. When using GPG to manage Kubernetes access, the goal is simple: encrypt what matters, verify identity, and keep control even when you rotate people, credentials, or systems. The difference between an orderly handoff and a team locked out of production can come down to one well-designed setup.
Why GPG for Kubernetes Access
GnuPG (GPG) brings strong encryption, decentralized key management, and identity verification that fits naturally into GitOps workflows. It can encrypt Kubernetes secrets at rest, ensure that only the intended engineers can decrypt them, and provide auditable trust for every change. Kubernetes has its own Role-Based Access Control (RBAC), but RBAC alone can’t stop secrets from being stored in plain text or from being accessible in ways you didn’t intend.
By controlling secrets with GPG, you bind access to individual public keys. Revoking someone’s rights can be as simple as removing their key and re-encrypting. New hires can be added in minutes without touching cluster-wide credentials. And because GPG integrates well with tools like SOPS or Sealed Secrets, it gives you a straightforward path to encrypted configs that live safely in your Git repository.
Key Setup Without Pain
Start with generating a GPG keypair for each person who needs access. Distribute their public keys into a managed list. Use SOPS with a configuration file that points to the current set of allowed keys. When a secret file is saved, SOPS encrypts it for everyone in the list. Kubernetes sees only the decrypted secret at runtime; in storage, it remains useless to anyone missing a private key.