Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Scale an Application Up

Sumit Rawal answered on June 17, 2023 Popularity 3/10 Helpfulness 1/10

Contents


More Related Answers

  • Introduction to Scaling an Application
  • Do It Yourself: Scale the Application
  • Scaling Up/Down Our Application
  • Scaling Up Our Application#

  • Scale an Application Up

    0

    In this lesson, you’ll manually edit the Deployment YAML file, increase the number of replicas to 10, and re-send it to Kubernetes.

    Check the current number of replicas.

    $ kubectl get deployment qsk-deploy

    NAME READY UP-TO-DATE AVAILABLE AGE

    qsk-deploy 5/5 5 5 4h33m

    Edit the deploy.yml file and set the spec.replicas field to 10.

    apiVersion: apps/v1

    kind: Deployment

    metadata:

    name: qsk-deploy

    spec:

    replicas: 5 <<== Change this to 10

    selector:

    matchLabels:

    project: qsk-book

    Use kubectl to re-send the updated file to Kubernetes. When Kubernetes receives the file, it will change the stored desired state from 5 replicas to 10 replicas. The Deployment controller will observe 5 replicas on the cluster and notice that it does not match the new desired state of 10. It will spin up 5 new replicas to bring the observed state in line with the desired state.

    Note: All the changes that you make are auto-saved on the platform.

    $ kubectl apply -f deploy.yml

    deployment.apps/qsk-deploy configured

    Run a couple of commands to check the status of the Deployment and the number of Pods.

    $ kubectl get deployment qsk-deploy

    You should get an output that looks like the one shown below:

    NAME READY UP-TO-DATE AVAILABLE AGE

    qsk-deploy 10/10 10 10 4h43m

    $ kubectl get pods 

    Popularity 3/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Tags: scale whatever
    Link to this answer
    Share Copy Link
    Contributed on Jun 17 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.