I tried to encode and decode secrets in Kubernetes cluster

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

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.

Decode a secret


Edit and delete the secret

kubectl kubectl edit secrets "secret name"
kubectl delete secret "secret name"

Conslusion

In this all the basic operation on secrets in kubernetes are shown, i hope it helps you.
Thank you