Kubernetes
Secrets Commands
Store and manage sensitive information securely. Learn to create, mount, and rotate secrets for passwords, API keys, and certificates in your Kubernetes applications.
7 commands
Pro Tips
Use 'kubectl create secret generic' for most cases, or 'docker-registry' type for image pull secrets.
Mount secrets as files instead of environment variables for better security - files can be updated without pod restart.
Consider external secret management (Vault, AWS Secrets Manager) for production workloads.
Common Mistakes
Kubernetes secrets are only base64 encoded, not encrypted. Enable encryption at rest in etcd for security.
Never commit secrets to git repositories. Use sealed-secrets or external secret operators.