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]

 Display decoded kubernetes secrets printed by kubectl.
 Example usage:

 kubectl get secret my-secret -o json | ksec

╭─ 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                                                                              │
│ --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.2.0.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

ksec-0.2.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ksec-0.2.0.tar.gz
Algorithm Hash digest
SHA256 77e806a8c6b087a70a14140746da5ddaf454280029b71bba0c8e0db1657b7892
MD5 05c6385e3238365300cc9828a1fc4ab4
BLAKE2b-256 470b74ee12a49fefea83386a7d23182f4e8ab047d3b6e773f8c4d9cbf5fc8f5d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for ksec-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 50962afb3f143729bee3cb17a13c521fa8f0790e723285706f4f3040d26b5e63
MD5 245792970f0bf10e7ceccf8aa3c31647
BLAKE2b-256 476f995b66aaa2763fb7f0390fca183e406d061c2db1bc15f26754ff69e25c9f

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