All Projects → kei6u → kubectl-secretdata

kei6u / kubectl-secretdata

Licence: MIT license
A kubectl plugin for viewing decoded Secret data with search flags.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to kubectl-secretdata

kubectlsafe
Safe operations in kubectl with plugin kubectlsafe
Stars: ✭ 36 (-2.7%)
Mutual labels:  kubectl, kubectl-plugins, kubectl-plugin
kubectl-gs
kubectl plugin helping with custom resources by Giant Swarm
Stars: ✭ 36 (-2.7%)
Mutual labels:  kubectl, kubectl-plugins, kubectl-plugin
kubectl-plugin-ssh-jump
A kubectl plugin to access nodes or remote services using a SSH jump Pod
Stars: ✭ 117 (+216.22%)
Mutual labels:  kubectl, kubectl-plugins, kubectl-plugin
kubectl-janitor
List Kubernetes objects in a problematic state
Stars: ✭ 48 (+29.73%)
Mutual labels:  kubectl, kubectl-plugins, kubectl-plugin
Kubectl Tree
kubectl plugin to browse Kubernetes object hierarchies as a tree 🎄 (star the repo if you are using)
Stars: ✭ 1,962 (+5202.7%)
Mutual labels:  kubectl, kubectl-plugins, kubectl-plugin
kube-lineage
A CLI tool to display all dependencies or dependents of an object in a Kubernetes cluster.
Stars: ✭ 238 (+543.24%)
Mutual labels:  kubectl, kubectl-plugins, kubectl-plugin
kubectl-iexec
Kubectl plugin to interactively exec into a pod
Stars: ✭ 102 (+175.68%)
Mutual labels:  kubectl, kubectl-plugins, kubectl-plugin
kubectl-ns
Simple kubectl plugin to display/switch namespaces
Stars: ✭ 20 (-45.95%)
Mutual labels:  kubectl, kubectl-plugins
kubectl-df-pv
kubectl plugin - giving admins df (disk free) like utility for persistent volumes
Stars: ✭ 256 (+591.89%)
Mutual labels:  kubectl, kubectl-plugin
rbac-tool
Rapid7 | insightCloudSec | Kubernetes RBAC Power Toys - Visualize, Analyze, Generate & Query
Stars: ✭ 546 (+1375.68%)
Mutual labels:  kubectl, kubectl-plugin
Kubectx
Faster way to switch between clusters and namespaces in kubectl
Stars: ✭ 11,922 (+32121.62%)
Mutual labels:  kubectl, kubectl-plugins
KuiClientTemplate
Use this template to make your own custom graphical terminal, via the Kui Grahpical CLI Framework
Stars: ✭ 26 (-29.73%)
Mutual labels:  kubectl, kubectl-plugins
Krew
📦 Find and install kubectl plugins
Stars: ✭ 4,354 (+11667.57%)
Mutual labels:  kubectl, kubectl-plugins
Kubectl Debug
Debug your pod by a new container with every troubleshooting tools pre-installed
Stars: ✭ 2,091 (+5551.35%)
Mutual labels:  kubectl, kubectl-plugins
kubectl-view-webhook
👀 ‼️ This projects aims to visualize critical parts of the admission webhook configuration resource
Stars: ✭ 96 (+159.46%)
Mutual labels:  kubectl, kubectl-plugin
kubectl-whoami
This plugin gets the subject name using the effective kubeconfig
Stars: ✭ 74 (+100%)
Mutual labels:  kubectl, kubectl-plugins
kubectl-sql
kubectl-sql is a kubectl plugin that use SQL like language to query the Kubernetes cluster manager
Stars: ✭ 50 (+35.14%)
Mutual labels:  kubectl, kubectl-plugin
kubectl-tmux-logs
A kubectl plugin to display container logs within separate tmux panes
Stars: ✭ 19 (-48.65%)
Mutual labels:  kubectl, kubectl-plugins
openebsctl
`openebsctl` is a kubectl plugin to manage OpenEBS storage components.
Stars: ✭ 23 (-37.84%)
Mutual labels:  kubectl, kubectl-plugin
kubectl-view-serviceaccount-kubeconfig-plugin
A kubectl plugin that show a kubeconfig to access the apiserver with a specified serviceaccount.
Stars: ✭ 33 (-10.81%)
Mutual labels:  kubectl, kubectl-plugins

kubectl-secretdata

.github/workflows/go_test.yaml

This plugin provides functions to view decoded Secret data and helpful flags such as regular expression, selecting multiple namespaces, label selectors, etc.

demo

Motivation

  • kubectl get secret outputs base64-encoded Secret. It is not easy to verify the real value.
  • Wanted functions like regular expression, selecting multiple namespaces to list up Secret data.

Usage

Display decoded secret data.  Prints decoded secret data about the found
secrets.  You can filter the list using a label selector and the --selector flag,
or using --regex. You will only see results in your current namespace unless
you pass --all-namespaces or --multi-namespaces.

Usage:
  secretdata [(-o|--output=json|yaml)] [NAME | -l label] ...) [flags]

Examples:

# List all secrets in json format
kubectl secretdata -A -o json

# List secrets in specified NAMESPACES in yaml form(default)
kubectl secretdata -m "ns1,ns2,ns3"

# List secrets which are matched with regex in specified NAMESPACE
kubectl secretdata -n ns1 --regex "^secret[0-9]"

# List secrets which are matched with labels from all namespaces
kubectl secretdata -A --selector "key1=value1,key2=value2"


Flags:
  -A, --all-namespaces                 If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.
      --as string                      Username to impersonate for the operation. User could be a regular user or a service account in a namespace.
      --as-group stringArray           Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
      --as-uid string                  UID to impersonate for the operation.
      --cache-dir string               Default cache directory (default "/Users/keisukeumegaki/.kube/cache")
      --certificate-authority string   Path to a cert file for the certificate authority
      --client-certificate string      Path to a client certificate file for TLS
      --client-key string              Path to a client key file for TLS
      --cluster string                 The name of the kubeconfig cluster to use
      --context string                 The name of the kubeconfig context to use
  -h, --help                           help for secretdata
      --insecure-skip-tls-verify       If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
      --kubeconfig string              Path to the kubeconfig file to use for CLI requests.
      --match-server-version           Require server version to match client version
  -m, --multi-namespaces string        The multi namespacess separated by "," where secrets exist.
  -n, --namespace string               If present, the namespace scope for this CLI request
  -o, --output string                  The format of the result (default "yaml")
      --password string                Password for basic authentication to the API server
      --regex string                   The regular expression for secret name (default ".*")
      --request-timeout string         The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0")
  -l, --selector string                Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
  -s, --server string                  The address and port of the Kubernetes API server
      --tls-server-name string         Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used
      --token string                   Bearer token for authentication to the API server
      --user string                    The name of the kubeconfig user to use
      --username string                Username for basic authentication to the API server

Installation

Krew

Use krew plugin manager to install. See the guide to install krew.

kubectl krew install secretdata
kubectl secretdata --help

Download the binary

Download the binary from GitHub Releases and drop it in your $PATH.

Linux

curl -L -o kubectl-secretdata.tar.gz https://github.com/keisku/kubectl-secretdata/releases/download/v1.0.5/kubectl-secretdata_v1.0.5_linux_amd64.tar.gz
tar -xvf kubectl-secretdata.tar.gz
sudo mv kubectl-secretdata /usr/local/bin

Darwin(amd64)

curl -L -o kubectl-secretdata.tar.gz https://github.com/keisku/kubectl-secretdata/releases/download/v1.0.5/kubectl-secretdata_v1.0.5_darwin_amd64.tar.gz
tar -xvf kubectl-secretdata.tar.gz
sudo mv kubectl-secretdata /usr/local/bin

Darwin(arm64)

curl -L -o kubectl-secretdata.tar.gz https://github.com/keisku/kubectl-secretdata/releases/download/v1.0.5/kubectl-secretdata_v1.0.5_darwin_arm64.tar.gz
tar -xvf kubectl-secretdata.tar.gz
sudo mv kubectl-secretdata /usr/local/bin

Source

go install github.com/keisku/kubectl-secretdata@latest
sudo mv $GOPATH/bin/kubectl-secretdata /usr/local/bin

Validation

Validate if kubectl secretdata can be executed. The Kubernetes documentation explains how to use a plugin.

kubectl secretdata --help
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].