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