A kubectl plugin to decode Kubernetes secrets
Add kubectl-decode-secret
to your kubectl
plugins directory. For more information about how plugins are loaded, please see the official documentation.
git clone git@github.com:brosandilabs/kubectl-decode-secret.git ~/.kube/plugins/kubectl-decode-secret
- docker - since this plugin relies on functionality only availale in
jq
1.6-rc1, a custom docker image is used to executejq
> kubectl plugin decode-secret --help
decode-secret allows users to view decoded kubernetes secrets
Usage:
kubectl plugin decode-secret [flags] [options]
Use "kubectl options" for a list of global command-line options (applies to all commands).
Decode content of 'my-secret' in 'default' namespace:
kubectl plugin decode-secret my-secret
Decode content of 'my-secret' in 'custom' namespace:
kubectl plugin decode-secret my-secret -n custom