1. Verify Your Cluster Is Running
First, ensure your Kubernetes cluster is healthy by listing all pods in thekube-system namespace:
If any core component is not
Running, troubleshoot using kubectl describe pod <pod-name> -n kube-system or check your cluster’s control-plane logs.2. Attempt to Fetch the Public Certificate
Run the following command to fetch the controller’s public certificate. This step fails initially because Kubeseal doesn’t know which controller service to target:3. Discover the Sealed Secrets Service
Identify the actual service name and namespace by listing services inkube-system:
- Service Name:
my-release-sealed-secrets - Namespace:
kube-system
4. Fetch and Save the Public Key
With the service details in hand, re-run the fetch command with the appropriate flags:pub-cert.pem containing the Sealed Secrets controller’s public key.
You’re ready to use
kubeseal with --cert pub-cert.pem to encrypt your Kubernetes Secrets. Learn more in the Sealed Secrets documentation.Quick Reference Table
| Step | Command | Purpose |
|---|---|---|
| Check cluster pods | kubectl get pods -n kube-system | Verify core components and Sealed Secrets pod state |
| List services | kubectl get svc -n kube-system | Discover the Sealed Secrets service name |
| Fetch controller certificate | kubeseal --fetch-cert --controller-name … | Retrieve public key for encrypting secrets |