Created
July 13, 2018 07:42
-
-
Save joshy91/f449f59af55079a3e21237d7dc955352 to your computer and use it in GitHub Desktop.
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 through yaml and cml | |
#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=4 | |
#Check status of nginx deployment after scaling | |
kubectl get deployments | |
#Check status of pods; including replicas | |
kubectl get pods | |
#Change set image in nginx deployment yaml | |
sed -i 's/replicas: 2/replicas: 4/g' /home/user/nginx-deployment.yaml | |
#Apply changes to nginx deployment yaml | |
kubectl apply -f nginx-deployment.yaml | |
#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