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
- Preferred method with uv:
uv tool install ksec
- With pipx:
pipx install ksec
- 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 │
│ --ephemeral -e Show the output in a temporary buffer that will be │
│ cleared upon exit. │
│ --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.5.0.tar.gz
(514.9 kB
view details)
Built Distribution
ksec-0.5.0-py3-none-any.whl
(4.7 kB
view details)
File details
Details for the file ksec-0.5.0.tar.gz
.
File metadata
- Download URL: ksec-0.5.0.tar.gz
- Upload date:
- Size: 514.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.30
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fc9d88218dfb4bee9c478c90ef0c5c3d9c445038ecd5dd65d24082eae1ad623 |
|
MD5 | 30a00eb7b1aae657f4debf792720d02d |
|
BLAKE2b-256 | f9d39de644109caae85a7ef429a81d65ab935b0c0c08b72ca7a5bf504414f371 |
File details
Details for the file ksec-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: ksec-0.5.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.30
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ae685bf5a39b8649b73970012370d08f5b927a40bbd7e1d03c36a33ce3d331a |
|
MD5 | 8807cfd70278567409181b4f917f0206 |
|
BLAKE2b-256 | 59d7b994bd344c761a1e439235133e960f81289a073fb4e407d5afa1722eeb3e |