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.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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

Hashes for py-dirk-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ac7cd8b6ea691f0e1dc27cb8fed21c8fc69f4319899351281123a852f1a7835d
MD5 775ffcc863b90080a88b1917b7be3be0
BLAKE2b-256 24501211c6e835739c3127891616701698cc2747498166d28a7288e0fccf66fd

See more details on using hashes here.

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

Hashes for py_dirk-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2adabeb243a11af9257e7adefaa728a7dd902bbe3db56d7258e229788bc09c6e
MD5 55d3ba2586511e1561ad1948ae91ae31
BLAKE2b-256 81ac8441c8c35735169cefa14c335878625fa73e6be75a7bd919680419c749d7

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