Automate All the Boring Kubernetes Operations with Python

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
Sevalla - Deploy and host your apps and databases, now with $50 credit!
Sevalla is the PaaS you have been looking for! Advanced deployment pipelines, usage-based pricing, preview apps, templates, human support by developers, and much more!
sevalla.com
featured
  1. kind

    Kubernetes IN Docker - local clusters for testing Kubernetes

    # https://github.com/kubernetes-sigs/kind/issues/398 # kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.5.0/components.yaml # kubectl patch -n kube-system deployment metrics-server --type=json \ # -p '[{"op":"add","path":"/spec/template/spec/containers/0/args/-","value":"--kubelet-insecure-tls"}]' from kubernetes import client api_client = client.ApiClient(configuration) custom_api = client.CustomObjectsApi(api_client) response = custom_api.list_cluster_custom_object("metrics.k8s.io", "v1beta1", "nodes") # also works with "pods" instead of "nodes" for node in response["items"]: print(f"{node['metadata']['name']: <30} CPU: {node['usage']['cpu']: <10} Memory: {node['usage']['memory']}") # api-playground-control-plane CPU: 148318488n Memory: 2363504Ki # api-playground-worker CPU: 91635913n Memory: 1858680Ki # api-playground-worker2 CPU: 75473747n Memory: 1880860Ki # api-playground-worker3 CPU: 105692650n Memory: 1881560Ki

  2. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
  3. python

    Official Python client library for kubernetes (by kubernetes-client)

    As you can imagine, that's a lot of functions to choose from, luckily all of them are listed in docs and you can click on any one of them to get an example of its usage.

  4. metrics-server

    Scalable and efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines.

    # https://github.com/kubernetes-sigs/kind/issues/398 # kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.5.0/components.yaml # kubectl patch -n kube-system deployment metrics-server --type=json \ # -p '[{"op":"add","path":"/spec/template/spec/containers/0/args/-","value":"--kubelet-insecure-tls"}]' from kubernetes import client api_client = client.ApiClient(configuration) custom_api = client.CustomObjectsApi(api_client) response = custom_api.list_cluster_custom_object("metrics.k8s.io", "v1beta1", "nodes") # also works with "pods" instead of "nodes" for node in response["items"]: print(f"{node['metadata']['name']: <30} CPU: {node['usage']['cpu']: <10} Memory: {node['usage']['memory']}") # api-playground-control-plane CPU: 148318488n Memory: 2363504Ki # api-playground-worker CPU: 91635913n Memory: 1858680Ki # api-playground-worker2 CPU: 75473747n Memory: 1880860Ki # api-playground-worker3 CPU: 105692650n Memory: 1881560Ki

  5. kopf

    A Python framework to write Kubernetes operators in just a few lines of code

    If you're looking for more examples beyond what was shown and referenced above, I recommend exploring other popular tools that make use Python Kubernetes client, such kopf - the library for creating Kubernetes operators. I also find it very useful to take a look at tests of the library itself, as it showcases its intended usage such this client test suite.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Korifi : API Cloud Foundry V3 expérimentale dans Kubernetes …

    7 projects | dev.to | 25 Dec 2022
  • Minikube VM. I’m having all sorts of trouble getting minikube to work. Does anyone know of a vm or lxc/LXD that is ready to go?

    4 projects | /r/kubernetes | 15 Aug 2021
  • Geek's Guide to Kubernetes Image Credential Provider Plugins: No Bloat

    6 projects | dev.to | 30 Aug 2025
  • Compose, Swarm, or K8s? a brutally honest decision guide

    2 projects | dev.to | 29 Aug 2025
  • Disaster Recovery and AI Vectors in MariaDB Kubernetes Operator 25.08.0

    1 project | dev.to | 7 Aug 2025

Did you know that Python is
the 2nd most popular programming language
based on number of references?