Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.21 KB

README.md

File metadata and controls

41 lines (29 loc) · 1.21 KB

Exercise 4 - Scaling in and out

Scale the number of Hello World service pods

  1. Scale the number of replicas of your Hello World service by running the following commands.

    kubectl get deployment
    
    NAME                    DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
    helloworld-service-v1   1         1         1            1           1m
    kubectl scale deployment helloworld-service-v1 --replicas=4
    kubectl get deployment
    
    NAME                    DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
    helloworld-service-v1   4         4         4            4           1m
    kubectl get pods
    
    NAME                          READY     STATUS    RESTARTS   AGE
    helloworld-service-v1-...    1/1       Running   0          1m
    helloworld-service-v1-...    1/1       Running   0          1m
    helloworld-service-v1-...    1/1       Running   0          1m
    helloworld-service-v1-...    1/1       Running   0          2m
  2. Scale the deployment back down.

    kubectl scale deployment helloworld-service-v1 --replicas=1