Running Multiple Instances of Your App
- Scale an app using kubectl.
Scaling is accomplished by changing the number of replicas in a Deployment
You can create from the start a Deployment with multiple instances using the —replicas parameter for the kubectl create deployment command
Running multiple instances of an application will require a way to distribute the traffic to all of them. Services have an integrated load-balancer that will distribute network traffic to all Pods of an exposed Deployment. Services will monitor continuously the running Pods using endpoints, to ensure the traffic is sent only to available Pods.
Scaling is accomplished by changing the number of replicas in a Deployment.