Skip to main content

Kubernetes secrets pretty printer

Project description

ksec

The ksec tool simply decodes secrets from kubectl to make it easier for the user to view them. It can parse output from kubectl in either JSON or YAML (if you install with the yaml extra).

Quickstart

  1. Preferred method with uv:
uv tool install ksec
  1. With pipx:
pipx install ksec
  1. With pip:
pip install ksec

Example usage

$ kubectl get secret my-secret -o json | ksec
{
  "SOME_ID": "cd31d8f5-9bf7-40a1-aced-a7faddd199ce",
  "SOME_KEY": "17153263835190001925"
}

Getting help

Simply run ksec --help:

$ ksec --help

 Usage: ksec [OPTIONS] [SEARCH]

 Display decoded kubernetes secrets printed by kubectl.
 Example usage:

 kubectl get secret my-secret -o json | ksec

╭─ Arguments ─────────────────────────────────────────────────────────────────────────────╮
│   search      [SEARCH]  Match a named secret data item using fuzzy search               │
│                         [default: None]                                                 │
╰─────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────────────────────────╮
│ --mode                -m      [JSON|YAML]  Set the format that should be processed from │
│                                            stdin. YAML mode requires installation with  │
│                                            the yaml flag.                               │
│                                            [default: JSON]                              │
│ --full                -f                   Include all the metadata for the secrets,    │
│                                            not just the data                            │
│ --install-completion                       Install completion for the current shell.    │
│ --show-completion                          Show completion for the current shell, to    │
│                                            copy it or customize the installation.       │
│ --help                                     Show this message and exit.                  │
╰─────────────────────────────────────────────────────────────────────────────────────────╯

License

Distributed under the MIT License. See LICENSE for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ksec-0.3.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

ksec-0.3.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file ksec-0.3.0.tar.gz.

File metadata

  • Download URL: ksec-0.3.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.29

File hashes

Hashes for ksec-0.3.0.tar.gz
Algorithm Hash digest
SHA256 9fe4f80a21e776e7b2912021d46228854f6e13e1dba0315a9f85817a9fbd6f23
MD5 859e7c2796c45596d93dfb0b92893f9d
BLAKE2b-256 46df14e95324f790ddacbfdd0811482d2c3588e963d44a5dd7bdd2aaceb1d1ff

See more details on using hashes here.

File details

Details for the file ksec-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: ksec-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.29

File hashes

Hashes for ksec-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 990edf07b2a8a01a8d7f0b052abddabaa8ff79ad7079393b90105f28da6def10
MD5 bebeacd59113f11894d3e5ddccdea41d
BLAKE2b-256 75ec49cff7cbfa16df8827f45f1c92204d92057b8677042d1bc6ab050e216e27

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page