Skip to main content

Python library and cli utility to check k8s client configurations

Project description

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)

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.4.tar.gz (38.2 kB view hashes)

Uploaded Source

Built Distribution

kubecfg-0.0.4-py3-none-any.whl (6.5 kB view hashes)

Uploaded Python 3

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