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 cluster
kubectl get nodes
-
Change to
example/bar
, runminikube start -p bar
and get the node of the minikube cluster
kubectl 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.2.tar.gz
.
File metadata
- Download URL: py-dirk-0.0.2.tar.gz
- Upload date:
- Size: 3.6 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 | ac7cd8b6ea691f0e1dc27cb8fed21c8fc69f4319899351281123a852f1a7835d |
|
MD5 | 775ffcc863b90080a88b1917b7be3be0 |
|
BLAKE2b-256 | 24501211c6e835739c3127891616701698cc2747498166d28a7288e0fccf66fd |
File details
Details for the file py_dirk-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: py_dirk-0.0.2-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 | 2adabeb243a11af9257e7adefaa728a7dd902bbe3db56d7258e229788bc09c6e |
|
MD5 | 55d3ba2586511e1561ad1948ae91ae31 |
|
BLAKE2b-256 | 81ac8441c8c35735169cefa14c335878625fa73e6be75a7bd919680419c749d7 |