create a Secret that stores the username 'admin' and the password 'S!B\*d$zDsb=' using "kubectl create secret" command.
$ kubectl create secret generic db-user-pass --from-literal=username=admin --from-literal=password='S!B\*d$zDsb='

Store the credentials in files.
$ echo -n 'admin' > ./username.txt
$ echo -n 'S!B\*d$zDsb=' > ./password.txt
The -n flag ensures that the generated files do not have an extra newline character at the end of the text.

Pass the file paths in the kubectl command.
$ kubectl create secret generic db-user-pass --from-file=./username.txt --from-file=./password.txt
$ kubectl create secret generic db-user-pass --from-file=username=./username.txt --from-file=password=./password.txt

Check that the Secret was created.
$ kubectl get secrets

View the details of the Secret.
$ kubectl describe secret db-user-pass


[Decode the Secret]
View the contents of the Secret you created.
$ kubectl get secret db-user-pass -o jsonpath='{.data}'
{ "password": "UyFCXCpkJHpEc2I9", "username": "YWRtaW4=" }

Decode the 'password' data.
$ echo 'UyFCXCpkJHpEc2I9' | base64 --decode
S!B\*d$zDsb=

These is other way to fetch and decode the 'password'.
$ kubectl get secret db-user-pass -o jsonpath='{.data.password}' | base64 --decode

Edit a Secret.
It opens default editor and allows to update any changes need to require.
$ kubectl edit secrets SECRET_NAME

Delete a Secret.
$ kubectl delete secret SECRET_NAME
  kubectl delete secret db-user-pass



LINK :- https://kubernetes.io/docs/tasks/configmap-secret/managing-secret-using-kubectl/
