A command line tool that simplifies the management of Kubernetes Secrets.
- Easily set and unset k8s Secret keys
- Handles base64 encoding
- Supports synchronization of
.env
files to k8s Secrets
Compiled binaries can be found in the GitHub releases.
Install compiled binary as a Helm plugin (requires Helm).
helm plugin install https://github.com/kanopy-platform/ksec
Install from source (requires golang).
go get github.com/kanopy-platform/ksec/cmd/...
helm plugin install
may not work on Windows if you have spaces in your HELM_HOME
path. You can instead download the windows executable from the latest release.
You may need to remove a plugin and clear your plugin cache if you have errors installing a plugin.
macOS
# rm cache
rm -rf ~/Library/Caches/helm/plugins/https-jackfan.us.kg-kanopy-platform-ksec*
# rm plugin
rm -rf ~/Library/helm/plugins/ksec/
A tool for managing Kubernetes Secret data
Usage:
ksec [command]
Available Commands:
completion Generate command completion scripts
create Create a Secret
delete Delete a Secret
get Get values from a Secret
help Help about any command
list List all secrets in a namespace
pull Pull values from a Secret into a .env file
push Push values from a .env file into a Secret
set Set values in a Secret
unset Unset values in a Secret
Flags:
--config string config file (Default: $HOME/.ksec.yaml)
-h, --help help for ksec
-n, --namespace string Operate in a specific NAMESPACE (Default: current kubeconfig namespace)
--version version for ksec
Use "ksec [command] --help" for more information about a command.
Run make
to run all tests and create a new binary in ${GOPATH}/bin/
Run VERSION=<version_number> make dist
to cross compile binaries into a ./dist/
directory. These binaries can then be uploaded to a new GitHub release.