kubernetes--Automatic expansion Container! Suppose you suddenly need to add your app; you just have to tell deployment a new number of pod copies

Source: Internet
Author: User

Reference: http://kubernetes.kansea.com/docs/hellonode/

Now you should be able to access this via this address service : Http://EXTERNAL_IP: 8080 or runcurl http://EXTERNAL_IP:8080

If you are accessing a new Web service through a browser or CURL, you should see some running logs:

kubectl logs <POD-NAME>

One of the great features of Kubernetes is that he can easily expand your application. Suppose you suddenly need to add your app; you just need to tell deployment a new number of pod copies:

kubectl scale deployment hello-node --replicas=4

Now you have 4 copies of the app, each running independently on the cluster and able to load balance traffic between them.

kubectl get deploymentNAME         DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGEhello-node   4         4         4            3           40m
kubectl get podsNAME                         READY     STATUS    RESTARTS   AGEhello-node-714049816-g4azy   1/1       Running   0          1mhello-node-714049816-rk0u6   1/1       Running   0          1mhello-node-714049816-sh812   1/1       Running   0          1mhello-node-714049816-ztzrb   1/1       Running   0          41m

kubernetes--Automatic expansion Container! Suppose you suddenly need to add your app; you just have to tell deployment a new number of pod copies

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.