cyprien nkounou:
Hello guys @Mumshad Mannambeth, I have a question .
When I am asked to create a secret,
kubectl create secret generic db-secret-xxdf --from-literal=DB_Host=sql01 --from-literal=DB_User=root --from-literal=DB_Password=password123
Should I hash the values first ? AKA echo -n <value> | base64
or just use the plain text values ? I am confused
Karthikaiselvan R:
You can just provide them in plain text for imperative command and kubectl internally converts them into base64 encoded values. You don’t have to do anything.
To verify the same, you can use the below command after the secret creation,
kubectl get secret db-secret-xxdf -o yaml
You will know, how the values are stored.
cyprien nkounou:
Thanks mate
Kyle Fifield:
Yep, only need to base64 the values if you are entering direct into yml