Python library and cli utility to check k8s client configurations
Project description
kubecfg
Python library and cli utility to check k8s client configurations
Show configuration
Test connectivity
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)
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
kubecfg-0.0.3.tar.gz
(38.2 kB
view hashes)