DEV Community

Cover image for Secrets in Kubernetes
Akshay Rao
Akshay Rao

Posted on

Secrets in Kubernetes

Introduction

Hi, I am Akshay Rao currently working in Annotation.i this blog I tried to manage secrets like username and password using kubectl.
Sensitive information, such as login credentials used by Pods to access services, is kept in a Secret object. A Secret might be required, for instance, to keep track of the username and password required to access a database.
I am using minikube and Base64 to encode the secrets.

Create and encode a Secret

first encode the raw data then encode with base64 and put it in a file.

Image 1

Decode a secret

Image 2

Edit and delete the secret

kubectl kubectl edit secrets "secret name"

Image 3
kubectl delete secret "secret name"

Conclusion

Suggest in the comments on which kubernetes topic should i write blog.
Thank you

Top comments (0)