Skip to main content

kubedownscaler

Scales down Kubernetes Deployments and StatefulSets to 0 replicas, keeps note of the number of replicas in annotations, and scales everything back up to the original number of replicas.

Can operate on a single namespace, or the entire cluster. Can operate only on Deployments and StatefulSets that use a specific StorageClass

Ideal for performing a controlled shutdown, maintenance, etc.

Uses whatever context your local kubectl has.

Install

pip install kubedownscaler

Use

Either -d|--down or -u|--up must be specified.

usage: kubectl downscale [-h] (-d | -u) [--dry-run] [-n NAMESPACE] [--deployments | --no-deployments]
               [--statefulsets | --no-statefulsets] [--storageclass STORAGECLASS]

options:
  -h, --help            show this help message and exit
  -d, --down            scale down cluster resources
  -u, --up              scale up to restore state
  --dry-run             don't actually scale anything
  -n NAMESPACE, --namespace NAMESPACE
                        namespace to operate on
  --deployments, --no-deployments
                        scale Deployments (default: True)
  --statefulsets, --no-statefulsets
                        scale StatefulSets (default: True)
  --storageclass STORAGECLASS
                        only scale Deployments and StatefulSets that are consuming a specific StorageClass

Build

poetry install
poetry build
poetry publish

Metadata

Release files for kubedownscaler 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kubedownscaler 0.5.0
File Size Uploaded Provenance Actions
kubedownscaler-0.5.0.tar.gz 3.4 kB Without provenance Details for kubedownscaler-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kubedownscaler 0.5.0
File Interpreter ABI Platform Actions
kubedownscaler-0.5.0-py3-none-any.whl Python 3 none any Details for kubedownscaler-0.5.0-py3-none-any.whl

Total release size: 7.8 kB

Release files / kubedownscaler-0.5.0.tar.gz

Download URL kubedownscaler-0.5.0.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
39a67afa86f1bcff799ad8aa08b8eab766dd0e8e4753bfab6b647f1096af9721
BLAKE2b-256 checksum
How to use checksums
603d31f9939d2b15b0fbd0c4ceddd388a7f6abdb442d3c572d6782e30a110357
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.15.2 Linux/7.0.0-1017-azure

Release files / kubedownscaler-0.5.0-py3-none-any.whl

Download URL kubedownscaler-0.5.0-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eec01679d4ae6f7220f59b2cbb9193b0b0e257c94954096367c6dd1c67b6a356
BLAKE2b-256 checksum
How to use checksums
71f2e98de3f9e5de4bcab135d963d8fbcd45ef6f87300590d7130a36e186b3cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.15.2 Linux/7.0.0-1017-azure

Security for kubedownscaler 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page