Posted On March 17, 2021

Kubernetes – Pausing Applications by Scaling Deployments or Stateful Sets

kimconnect 0 comments
blog.KimConnect.com >> Linux , Virtualization >> Kubernetes – Pausing Applications by Scaling Deployments or Stateful Sets
# Pause application
kubectl scale deploy nextcloud --replicas=0
kubectl scale statefulsets nextcloud-db-postgresql --replicas=0
kubectl scale deploy pihole --replicas=0

# Resume application
kubectl scale deploy nextcloud --replicas=1
kubectl scale statefulsets nextcloud-db-postgresql --replicas=1
kubectl scale deploy pihole --replicas=1

# Alternate for deployments scaling
kubectl scale deploy -n default --replicas=0 --all
kubectl scale deploy -n default --replicas=1 --all

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Lubuntu 20.04 – Enable SSH

# Install sshd sudo apt install ssh -y sudo systemctl enable --now ssh # Configure…

ESX & Enterasys LAG Configurations

Requirements for ESX and LACP compatibility of Enterasys core switches:1. static LAG2. vlan egress port…

Hyper-V Live Migration Error 0x8007003B

Symptom: Live migration of 'Virtual Machine TESTVM' failed.Virtual machine migration operation for 'TESTVM' failed at…
Other project: DragonCoin.com