Hysen Labs
CLI tool
dtan4/k8sec avatar
dtan4

k8sec

CLI tool to manage Kubernetes Secrets easily

265 stars23 forksGoMIT
DEEP OPEN-SOURCE ANALYSIS

k8sec

A small Go command line tool for managing Kubernetes Secrets as dotenv style key value pairs.

What k8sec does

k8sec is a command line tool that makes working with Kubernetes Secrets resemble working with ordinary environment files. It can list secrets, set key value pairs, unset keys, load secrets from dotenv formatted text, and dump secrets back out as dotenv text. The list command can show values as base64 encoded strings, and the tool accepts global options for Kubernetes context, kubeconfig path and namespace, defaulting the namespace to default and the kubeconfig to the standard ~/.kube/config location. This makes it a lightweight alternative to editing secrets through kubectl manifests by hand.

Installation

The project offers three install paths. On macOS it is available through Homebrew via a tap maintained at dtan4/homebrew-tools. Precompiled binaries for Windows, OS X and Linux are published on the releases page. From source, it can be fetched with go get and built with make install. The README states the tool requires Kubernetes 1.18 or above, which sets the minimum cluster version for the Secrets API it depends on. The contribution guide asks submitters to run go test ./... and gofmt -s before opening a pull request, giving the project simple but explicit quality gates.

Workflow fit

The load and dump commands are the practical core for local development. A developer can dump a secret into a .env file, edit it locally, and load it back into a cluster, or pipe a .env straight into k8sec load via stdin. This round trip is useful when migrating configuration between clusters or when seeding secrets during local testing. Because the data format is plain key equals value text, it interoperates with existing dotenv based tooling without extra conversion steps.

Editorial conclusion

The project is MIT licensed, reports two hundred sixty five stars at time of indexing, and uses go test plus gofmt as its contribution gates.

DEEP OPEN-SOURCE ANALYSIS

Official sources

Community notes

Community notes