Automate All the Boring Kubernetes Operations with Python

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

Judoscale - Save 47% on cloud hosting with autoscaling that just works
Judoscale integrates with Django, FastAPI, Celery, and RQ to make autoscaling easy and reliable. Save big, and say goodbye to request timeouts and backed-up task queues.
judoscale.com
featured
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
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. Judoscale

    Save 47% on cloud hosting with autoscaling that just works. Judoscale integrates with Django, FastAPI, Celery, and RQ to make autoscaling easy and reliable. Save big, and say goodbye to request timeouts and backed-up task queues.

    Judoscale 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
  • Simulando um cluster k8s localmente com Kind

    3 projects | dev.to | 21 Apr 2025
  • Building a Secure CI/CD Pipeline for a TypeScript Application Using GitHub Actions and ArgoCD

    1 project | dev.to | 14 Apr 2025
  • From Helm Chart to Developer UI in 5 Minutes

    2 projects | dev.to | 3 Apr 2025

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