Created
July 13, 2018 07:29
-
-
Save joshy91/33b7863f47bb29e86bc461a67c7cffeb to your computer and use it in GitHub Desktop.
Manually scaling an application
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Manually scaling an application (can also be done through yaml changes) | |
#Nginx deployment yaml created in previous script | |
kubectl create -f nginx-deployment.yaml | |
#Detailed status of nginx deployment | |
kubectl describe deployment nginx-deployment | |
#Scale deployment to 3 replicas | |
kubectl scale deployment/nginx-deployment --replicas=3 | |
#Check status of nginx deployment after scaling | |
kubectl get deployments | |
#Check status of pods; including replicas | |
kubectl get pods | |
#Scale deployment to 1 replicas | |
kubectl scale deployment/nginx-deployment --replicas=1 | |
#Check status of pods; including replicas | |
kubectl get pods | |
#Scale deployment to 2 replicas | |
kubectl scale deployment/nginx-deployment --replicas=2 | |
#Check status of pods; including replicas | |
kubectl get pods |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment