kubecfg

Python library and cli utility to check k8s client configurations


License
MIT
Install
pip install kubecfg==0.0.4

Documentation

kubecfg

Python library and cli utility to check k8s client configurations

PyPi Code style: black

Show configuration Features

Test connectivity Ping

Install

pip install kubecfg

Run

kubecfg

Use the library

This example shows how to use the HTTPX to obtain the version of the API server.

import httpx
from kubecfg.config import KubeConfig

k8s_config = KubeConfig()
k8s_config.load_config()

server, cert, client_ca = k8s_config.get_auth_data()
r = httpx.get(f"{server}/version", cert=cert, verify=client_ca)
r.raise_for_status()
print(r.text)