Scale down and restore Kubernetes deployments and statefulsets
Project description
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.
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: main.py [-h] (-d | -u) [--dry-run] [-n NAMESPACE] [--deployments | --no-deployments]
[--statefulsets | --no-statefulsets]
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)
Build
poetry install
poetry build
poetry publish
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kubedownscaler-0.1.7.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for kubedownscaler-0.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 698817a6adf09d536ac8b452701558aeba6c32c2b2ea0b30f4654f1dad245733 |
|
MD5 | 06f1c4054a420c5b0cb441bc51af08a9 |
|
BLAKE2b-256 | ddfbb6e0d6d46e9186319e198e8581b63100e49c30bd7520a6ec98da81e744a1 |