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.
Metadata
Release files for ksec 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ksec-0.5.1.tar.gz | 514.9 kB | Without provenance | Details for ksec-0.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ksec-0.5.1-py3-none-any.whl | Python 3 | none | any | Details for ksec-0.5.1-py3-none-any.whl |
Total release size: 519.6 kB
Release files / ksec-0.5.1.tar.gz
| Download URL | ksec-0.5.1.tar.gz |
|---|---|
| Size | 514.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2e6b6153c92ec396b78ea41d47ed1dfb3e979a8b9634c604fd77eeca52a8e87
|
|
BLAKE2b-256 checksum How to use checksums |
1f2d0670abd73a19bb05353487c82ba047c3b462a92bb90d9e65fbfd807e8b30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.4.30
|
Release files / ksec-0.5.1-py3-none-any.whl
| Download URL | ksec-0.5.1-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af0184dc96d6d8ed4947ceafc10922320b11a51c70970dbbeadd59b95b84a70a
|
|
BLAKE2b-256 checksum How to use checksums |
b6d287baf5e9f9d5df8d06f3e5a67f0dc2716f2418ec51e86c5c6befb8ef0413
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.4.30
|
Security for ksec 0.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.