Skip to main content

Collection of Kubernetes command-line utilities

Project description

k8s-utils

A collection of Kubernetes command-line utilities built with Python and Typer.

Installation

This project uses uv for package management. Make sure you have uv and uvx installed.

Just testing it out:

# Install dependencies
uvx k8s-helpers --help

Installation

uv tool install k8s-helpers

This installs the k8s-helpers command and the shorthand k8sh

Commands

podcount

Count non-daemonset pods per node in the current Kubernetes context.

# Use current context
k8sh podcount

# Specify a different context
k8sh podcount --context my-context

# Show nodegroup and zone labels, and sort by nodegroup
k8sh podcount \
--node-labels "eks.amazonaws.com/nodegroup" \
--node-labels "topology.kubernetes.io/zone" \
--sort "eks.amazonaws.com/nodegroup"

This command:

  • Retrieves all pods and nodes in the cluster
  • Excludes pods managed by DaemonSets
  • Displays a table showing pod count per node
  • Shows total non-DaemonSet pod count

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

k8s_helpers-1.0.7.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

k8s_helpers-1.0.7-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file k8s_helpers-1.0.7.tar.gz.

File metadata

  • Download URL: k8s_helpers-1.0.7.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for k8s_helpers-1.0.7.tar.gz
Algorithm Hash digest
SHA256 0824383f4ef83df89339fabb644df12a1e671f0e0a263f0b37efe3b1b1b99b9f
MD5 c7d4a1bb5686d09c8247b9b1e7ed2d27
BLAKE2b-256 89f4670f5bc380d9ec3dcaa4c7e4611c9a60f8c75d8787c0f4ecc58ea9c03fc7

See more details on using hashes here.

Provenance

The following attestation bundles were made for k8s_helpers-1.0.7.tar.gz:

Publisher: ci.yml on trondhindenes/k8s-helpers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file k8s_helpers-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: k8s_helpers-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for k8s_helpers-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 8ec86a67e81d98accc1a2d2724f2c1029093edb76047efc819c72b9336f70c1c
MD5 e65c0531f01558475b4c2eae468d896b
BLAKE2b-256 e1364ced809f637914179b1a819a777600a2c06699186977b46d5c0c8c201f66

See more details on using hashes here.

Provenance

The following attestation bundles were made for k8s_helpers-1.0.7-py3-none-any.whl:

Publisher: ci.yml on trondhindenes/k8s-helpers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page