Editing your kubernetes secret easily

Introducing Kubernetes Secret Editor, the effortless way to edit your Kubernetes secrets directly from your web browser! YAML and secret data never leave your browser.

Do Exploit
2 min readDec 9, 2023
Generated by stability-ai/stable-diffusion.

Over the past year, I’ve been learning into the world of Container Orchestration, especially Kubernetes, and in the last few months, I’ve found myself working with it more frequently. New applications keep coming up with some configuration and variables that must be included in Kubernetes Secret. Seeking a solution for easily managing these secrets, I initially stumbled upon a one-line CLI command and a base64 encoder/decoder on a website. Still requires some efforts to be able to encode and decode the value. Eventually, I discovered tools that were closer to what I needed — an interactive web-based Kubernetes secret editor. But, it must be installed in our kubernetes cluster.

Then, I remember — I had prior experience with Golang Templates and Grok Parser, both featuring online editors. It really helped me.

These tools are built on top of WebAssembly, processing data entirely on the client side. Inspired by this, I realized I could create a similar website for editing kubernetes secret easily.

Get started with Kubernetes Secret Editor

Once opened, you can paste your Kubernetes code into the left box. Then, you can edit the secret value in the right box. The original Kubernetes secret will be encoded to base64, matching the plain secret value you entered.

This tool is open source, allowing you to host your own Kubernetes Secret Editor. Additionally, a Dockerfile is available to easily build it into a container image, allowing you to run it anywhere.

Editing simple secret

Editing multiline secret values

Explore it live on https://michael-act.github.io/kubernetes-secret-editor/ and for those who are interested in how it works, see here https://github.com/michael-act/kubernetes-secret-editor .

--

--

Do Exploit

I share stories about what I've learned in the past and now. Let's connect to Instagram! @do.exploit