Key Concepts
Secret
Type
Data
stringData
Required Permissions
Secret Types
How to View Secrets
Select Cluster
Select Namespace
Search
How to View Secret Details
Find the Secret
Click Secret Name
Review Details
- Overview: Name, namespace, type, key count, size, age
- Data: Base64-encoded values (can be decoded)
- Labels & Annotations: Metadata attached to the Secret
- Events: Recent Kubernetes events
How to Create a Secret
Click Create Secret
Write YAML
type- Secret type (defaults to Opaque)data- Base64-encoded key-value pairsstringData- Plain text values (auto-encoded)
Select Namespace
Create
How to Edit a Secret
Open Actions Menu
Click Edit Secret
Modify Data
- Update existing values
- Add new keys
- Change the type (with caution)
Save
How to Delete a Secret
Open Actions Menu
Click Delete
Confirm
Using Secrets in Pods
As Environment Variables
As Volume Mounts
For Image Pull
Creating Common Secret Types
TLS Secret
Docker Registry Secret
Basic Auth Secret
Troubleshooting
Pod fails to start with Secret error
Pod fails to start with Secret error
- Verify the Secret exists in the same namespace as the pod
- Check Secret name spelling in pod spec
- Ensure referenced keys exist in the Secret
- Use
optional: trueif Secret might not exist
Image pull fails with authentication error
Image pull fails with authentication error
- Verify imagePullSecrets is configured on the pod or ServiceAccount
- Check the Docker Secret contains valid credentials
- Ensure the Secret type is
kubernetes.io/dockerconfigjson - Verify the registry URL in the Secret matches the image registry
TLS Secret not working
TLS Secret not working
- Ensure type is
kubernetes.io/tls - Verify keys are exactly
tls.crtandtls.key - Check certificate and key are valid and match
- Ensure values are base64-encoded
Secret data appears corrupted
Secret data appears corrupted
- Values must be base64-encoded in
datafield - Use
stringDatafor plain text (auto-encoded) - Don’t double-encode values
- Verify encoding with
echo "<value>" | base64 -d
Secret changes not reflected in pod
Secret changes not reflected in pod
- Pods don’t automatically reload Secrets
- Restart the deployment/pod to pick up changes
- Volume-mounted Secrets eventually update (kubelet sync)
- Environment variables from Secrets never auto-update
Cannot see Secret data
Cannot see Secret data
- List view masks data for security (shows ***)
- Click the Secret name to view actual values in detail view
- YAML view shows base64-encoded data
FAQ
Are Secrets actually secure?
Are Secrets actually secure?
What's the difference between data and stringData?
What's the difference between data and stringData?
stringData when creating Secrets manually for convenience.Can I use Secrets across namespaces?
Can I use Secrets across namespaces?
Why is my Secret type important?
Why is my Secret type important?
kubernetes.io/tls requires tls.crt and tls.key, and kubernetes.io/dockerconfigjson is recognized by kubelet for image pulls.How do I rotate Secrets?
How do I rotate Secrets?
What's the size limit for Secrets?
What's the size limit for Secrets?
Should I commit Secrets to version control?
Should I commit Secrets to version control?
How do ServiceAccount tokens work?
How do ServiceAccount tokens work?
kubernetes.io/service-account-token Secrets for ServiceAccounts. These contain tokens for authenticating to the API server.