I inherited a Kubernetes/Docker setup, and I accidentally crashed the pod by changing something relating to the DB password.
I am trying to troubleshoot this.
I don't have much Kubernetes or Docker experience, so I'm still learning how to do things.
The value is contained inside the db-user-pass credential I believe, which is an Opaque type secret.
I'm describing it:
kubectl describe secrets/db-user-pass
Name: db-user-pass
Namespace: default
Labels: <none>
Annotations: <none>
Type: Opaque
Data
====
password: 16 bytes
username: 13 bytes
but I have no clue how to get any data from this secret. The example on the Kubernetes site seems to assume I'll have a base64 encoded string, but I can't even seem to get that. How do I get the value for this?
kubectl get secret db-user-pass -o yaml
, which will dump it out in YAML form and usually includes the encoded secret values.kubectl get secret db-user-pass -o json | jq '.data | map_values(@base64d)'
. This givest the nicest results but needs the jq dependency.