ksns
Kubernetes CLI wrapper in Python for switching and listing namespaces. It does not require kubectl to work.
Developed by Ratul (c) 2021
Installation
Requires Python 3.6+.
pip3 install ksns
Usage
You need to Set the KUBECONFIG environment variable or ~/.kube/config will be considered.
ratul ➤ ksns --help
Usage: python -m ksns [OPTIONS] COMMAND [ARGS]...
NOTE: Set the KUBECONFIG environment variable or ~/.kube/config will be
considered
USAGE:
1. list namespaces : ksns list
2. switch namespaces: ksns ns <namespace_name>
Options:
--help Show this message and exit.
Commands:
list List of namespaces in context
ns Switch to another namespace: <namespace_name>
The current namespace color you are in will be yellow in the output of list namespace.
List namespaces
ratul ➤ ksns list
default
demo
kube-node-lease
kube-public
kube-system
kubernetes-dashboard
monitoring
note: using config: /home/ubuntu/config
Switch Namespace
ratul ➤ ksns ns monitoring
switched to monitoring namespace
note: using config: /home/ubuntu/config
Local Changes
It’s recommended to have a virtualenv for the project.
Go to the project dir and install dependencies
cd <project-path>
pip3 install -r requirements.txt
pip3 install --editable .
Metadata
Release files for ksns 0.0.5
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 |
|---|---|---|---|---|
| ksns-0.0.5.tar.gz | 16.1 kB | Without provenance | Details for ksns-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ksns-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for ksns-0.0.5-py3-none-any.whl |
Total release size: 32.8 kB
Release files / ksns-0.0.5.tar.gz
| Download URL | ksns-0.0.5.tar.gz |
|---|---|
| Size | 16.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6eca8ec1764ac50dd9c31c93a4193e0b8a2a82f7393ff82c2d597a2f59646395
|
|
BLAKE2b-256 checksum How to use checksums |
246c9e74f3e053c5d4d306cf1766a4cad1a3c26cbb667436457ea1d6c7d45ef0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
|
Release files / ksns-0.0.5-py3-none-any.whl
| Download URL | ksns-0.0.5-py3-none-any.whl |
|---|---|
| Size | 16.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7c590053452f48d07dd8dbb6b848930cb3e44171a774e7ffe24b78a156a38bee
|
|
BLAKE2b-256 checksum How to use checksums |
f164afebffc3fc8ba4fe90b099c415ea0a050448946e3ed1ff06cdcb8f5db279
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5
|
Security for ksns 0.0.5
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.