kubectl-ksd

command module
v0.0.0-...-4d79fea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

README

Kubernetes Secret Decode

It is just a fork of https://github.com/ashleyschuett/kubernetes-secret-decode, which uses go modules and allows easy installation via go install github.com/fxposter/kubectl-ksd@latest.

Description

Be able to easily see the values of a secret.

YAML and JSON are both supported and detection of the input type is performed automatically.

Before:

$ kubectl get secret my-secret -o yaml
apiVersion: v1
data:
  password: cGFzc3dvcmQ=
  username: dXNlcm5hbWU=
kind: Secret
metadata:
  creationTimestamp: 2018-05-09T21:01:37Z
  name: my-secret
  namespace: default
  resourceVersion: "20229"
  selfLink: /api/v1/namespaces/default/secrets/my-secret
  uid: 29ef8024-53cc-11e8-967d-080027cd91ae
type: Opaque

After:

$ kubectl ksd get secret my-secret -o yaml
apiVersion: v1
stringData:
  password: password
  username: username
kind: Secret
metadata:
  creationTimestamp: "2018-05-09T21:01:37Z"
  name: my-secret
  namespace: default
  resourceVersion: "20229"
  selfLink: /api/v1/namespaces/default/secrets/my-secret
  uid: 29ef8024-53cc-11e8-967d-080027cd91ae
type: Opaque
Installation
go install github.com/fxposter/kubectl-ksd@latest
Usage
kubectl ksd get secret my-secret -o yaml
kubectl ksd get secret my-secret -o json

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL