Skip to main content

Command line tool to explore the Kubernetes API using Python expressions

Project description

Kubernetes Python Exploration Tool

Command line tool to explore the Kubernetes API using Python expressions

PyPi Code style: black

Motivation

Explore the Kubernetes API by using «k8s tailored» REST client while supporting Python expressions for formatting and filterting data.

Install

pip install kpet

Usage examples

Show the current kubernetes context configuration (detected from your KUBECONFIG file)

kpet show

List all the API endpoints

kpet get

Get the kubernetes API server version

kpet get version

Get the list of nodes

kpet get api/v1/nodes

Get the PodIP for all pods, check the special symbols for other symbols.

kpet get api/v1/pods -f "{name} is using IP {_s.podIP}"

Print the name for all running pods

kpet get api/v1/pods -f"{name}" -s "_s.phase=='Running'"

Print the name for all nodes which are Ready

kpet get api/v1/nodes -f"{name}" -s "[c for c in _s['conditions'] if c.type=='Ready' and c.status=='True']"

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

kpet-0.0.2.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

kpet-0.0.2-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file kpet-0.0.2.tar.gz.

File metadata

  • Download URL: kpet-0.0.2.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for kpet-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b23df8f3a65fd8e79a9026b146de11843c2065cea390d1e6d64dced6cb2f4e13
MD5 ed5d6ea25428e77969d9095fbae412fb
BLAKE2b-256 f77b5c34ee89e50bc40c1baa75a93474c17498bc580422c05e4056d76948d9fc

See more details on using hashes here.

File details

Details for the file kpet-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: kpet-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for kpet-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b43b256b4c001ceb98d653d84593420528f69a1ad7c3eec6c1198f20540cb376
MD5 a5f52f63bdab98741a9cde826e423b1c
BLAKE2b-256 e0d769685ee6cd582335c7c530ddc7fc4b2d095945a443f09e1c1e575ed7a8a1

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