About kubernetes resource generator
Generate YAML for supporting resources like ConfigMaps, Secrets, Namespaces and PersistentVolumeClaims.
Secrets
A Kubernetes Secret is only Base64-encoded, not encrypted by default. Restrict access with RBAC and consider encryption at rest or an external secret store.
A worked example
A ConfigMap holds non-secret settings such as LOG_LEVEL=info, which a Deployment can load as environment variables. A Secret holds values such as a database password. A PersistentVolumeClaim asks for storage, for example 10Gi, for a database pod.
Handy commands
- kubectl get configmap,secret,pvc shows what exists.
- kubectl describe pvc name explains why a claim is pending.
- kubectl delete -f file.yaml removes what you created.
Secrets in practice
Secrets values must be Base64-encoded in the YAML, which is not encryption. Limit who can read them, avoid committing them to Git and consider a secrets manager for production.
