Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rajatjindal/kubectl-modify-secret

kubectl-modify-secrets allows user to directly modify the secret without worrying about base64 encoding/decoding
https://github.com/rajatjindal/kubectl-modify-secret

kubectl kubectl-modify-secrets kubectl-plugin kubectl-plugins

Last synced: 3 months ago
JSON representation

kubectl-modify-secrets allows user to directly modify the secret without worrying about base64 encoding/decoding

Awesome Lists containing this project

README

        

# kubectl-modify-secret

`kubectl-modify-secret` is a [kubectl plugin](https://kubernetes.io/docs/tasks/extend-kubectl/kubectl-plugins/) that allows user to modify the secret without having to worry about doing base64 encoding/decoding.

This plugin pulls the secret from Kubernetes, and open the configured editor with just the decoded secret data. Once user makes changes, save and quit the editor, the plugin automatically apply the updated data to Kubernetes.

![using kubectl-modify-secret plugin](demo/usage.gif)

# Installing via krew
- install `krew` using instructions [here](https://github.com/kubernetes-sigs/krew#installation)
- run `kubectl krew update`
- run `kubectl krew install modify-secret`

# Install via brew
- run `brew install rajatjindal/tap/modify-secret`

![installing kubectl-modify-secret plugin](demo/installation.gif)

# Usage

- use namespace and kubeconfig from $KUBECONFIG current context

```bash
kubectl modify-secret xyz
```

- provide namespace explicitly

```bash
kubectl modify-secret xyz -n kube-system
```

- use different kubeconfig file

```bash
kubectl modify-secret xyz --kubeconfig /path/to/different/kube/config
```