Skip to main content

Lightweight Python module for creating, manipulating, and editing kubeconfig files

Project description


Lightweight Python module for creating, manipulating, and editing kubeconfig files

Why not use or wrap kubectl config? kubectl config is great and writing a Python wrapper is a fine solution. However, kubectl config is quite limited in functionality. I wanted more control over my kubernetes config. kubeconfig gives me that control. It doesn't use kubectl at all. Rather, it reads, edits, and writes config files entirely on its own.

Getting starting

Install this package using pip:

pip install kubeconf

Basic Usage

from kubeconf import KubeConf

k = KubeConf(path='path/to/config')

# Open the file

# Add a cluster

# Add a user for that cluster

# Add a context to map the user to the cluster

# Commit change to the file.


Download and install this repo from source, and move into the base directory.

git clone
cd kubeconf

If you use pipenv, you can install a developement version:

pipenv install --dev

Otherwise you can install a development version using pip

pip install -e .


The code in this project is licensed under MIT license.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for kubeconf, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size kubeconf-0.0.5-py2.py3-none-any.whl (5.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size kubeconf-0.0.5.tar.gz (4.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page