Skip to main content

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

  1. Install dirk and minikube.
  2. Run example/build_example.sh.
  3. Change to example/foo, run
    minikube start -p foo 
    
    and get the node of the minikube cluster
    kubectl get nodes 
    
  4. Change to example/bar, run
    minikube start -p bar
    
    and get the node of the minikube cluster
    kubectl get nodes 
    
  5. Change to example/foo again and get the node
    minikube 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

py-dirk-0.0.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

py_dirk-0.0.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

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

Hashes for py-dirk-0.0.1.tar.gz
Algorithm Hash digest
SHA256 116baf523d4057422cf4e730c587e294fdcb32a9721cfdb122490d0fe8c88361
MD5 f755af37c0123bc5ee88b4191639ee8c
BLAKE2b-256 9a842b0d5defb8670644f3641e662fa8bbbdad72ad581f3ac3534ba42bf12a4b

See more details on using hashes here.

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

Hashes for py_dirk-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a49f805114036cd6f7ffdd7b3c76b745fd19a2ed6669fcba363ee29826780faa
MD5 2b1c7f4d6a0bc16e51809e249463c53a
BLAKE2b-256 649d2084a9896fc43a3d5a8e9bcafa9c23e19d440edebc9a0bc0f9288738eb9d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page