DEV Community

Cover image for Secrets in Kubernetes
Akshay Rao
Akshay Rao

Posted on

1

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

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay