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

Setting Up FTP on CentOS 5.3

Install VSFTPD yum -y install vsftpd   Configure: vim /etc/vsftpd/vsftpd.conf ------------------- anonymous_enable=NO // line 12:…

How to Install Chrome on Ubuntu 20.04

Ubuntu and its variants are pre-packaged with Mozilla's Firefox Web Browser. Although that is a…

How to Install Asterisk on Ubuntu

su[enter root password]cd /tempwget apt-get install build-essential wget libssl-dev libncurses5-dev libnewt-dev libxml2-dev linux-headers-$(uname -r) libsqlite3-dev…