dirk exports KUBECONFIG via direnv
Project description
py-dirk
dirk is a tool for Kubernetes administrators who manage a large number of clusters. dirk makes sure that you always communicate with the right kubernetes cluster, even though you switch between many project folders.
py-dirk is the Python implementation of dirk.
Install py-dirk
Install py-dirk like this:
pip install py-dirk
Use dirk
Init dirk for a certain project folder like this:
dirk init <directory>
This command creates a kubeconfig file which will be used by kubectl as long your current working directory is in the project folder. Leaving the project folder will lead to the kubeconfig file to be unloaded.
Example of use
- Install dirk and minikube.
- Run
example/build_example.sh
. - Change to
example/foo
, runminikube start -p foo
and get the node of the minikube clusterkubectl get nodes
- Change to
example/bar
, runminikube start -p bar
and get the node of the minikube clusterkubectl get nodes
- Change to
example/foo
again and get the nodeminikube start -p foo
As you can see, changing the directory changes the kubeconfig file which is used by kubectl.
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
Built Distribution
File details
Details for the file py-dirk-0.0.1.tar.gz
.
File metadata
- Download URL: py-dirk-0.0.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 116baf523d4057422cf4e730c587e294fdcb32a9721cfdb122490d0fe8c88361 |
|
MD5 | f755af37c0123bc5ee88b4191639ee8c |
|
BLAKE2b-256 | 9a842b0d5defb8670644f3641e662fa8bbbdad72ad581f3ac3534ba42bf12a4b |
File details
Details for the file py_dirk-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: py_dirk-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a49f805114036cd6f7ffdd7b3c76b745fd19a2ed6669fcba363ee29826780faa |
|
MD5 | 2b1c7f4d6a0bc16e51809e249463c53a |
|
BLAKE2b-256 | 649d2084a9896fc43a3d5a8e9bcafa9c23e19d440edebc9a0bc0f9288738eb9d |