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

SSL Certificates with LetsEncrypt

The following configuration is for demonstration purposes, only. It is of vital importance that the…

PowerShell: How to Change Guest VM Names in Virtual Machine Manager

# changeGuessVmNameInVmm.ps1 # The following script prepend all VM's matching certain pattern # This is…

PowerShell: Maintain Linux Services via SSH Remoting

Version 2: # maintainLinuxServices.ps1 # Version 0.0.2 # Description: this is a simple script to…