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.1

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.1
File Size Uploaded Provenance Actions
kubedownscaler-0.5.1.tar.gz 3.4 kB Without provenance Details for kubedownscaler-0.5.1.tar.gz

Built distribution (wheel)

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

Total release size: 7.8 kB

Release files / kubedownscaler-0.5.1.tar.gz

Download URL kubedownscaler-0.5.1.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
630e505930bbf357acabf3ae59baabbd6ec5a54aa5be68638d4394656364f1fd
BLAKE2b-256 checksum
How to use checksums
b232055fcccf1bb9a6277c43817aa9e7c5180ee2a4b84c7491aa641363ad93a0
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.1-py3-none-any.whl

Download URL kubedownscaler-0.5.1-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93c21679f17226e7fd6f8ad3a1c0ae3ad880f0708c9d3b053622b6045d0aee7a
BLAKE2b-256 checksum
How to use checksums
9e41798bb2f6be014ac8e5a290f6ab65284c90616fd31702c9e36672c9bc1214
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.1

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