Vasu BK:
Hi all,
I am trying to create a secret with yaml file. I guess, I have the content right, but still failing. Details are below. Can u help me understand whats wrong with my input? Thanks in advance.
root@controlplane:~# kubectl create -f my-secrete.yaml
Bharath A G:
You had to pass the secret value as base64
Bharath A G:
echo -n “mysql”|base64
Vasu BK:
Thank you Bharth for response. In theory session, examples mentioned with plain text as input for both data: option and external file option.
–from-literal option also we are using plain text format. So, would you please elaborate on that
Tej_Singh_Rana:
Hello, @Vasu BK
When you create secret from command line, we don’t need to encode in base64. kubectl command line tool take care of it. From declarative way, we have to encode first.
Vasu BK:
Hi Tej,
Thank you for clarification