Setting up horizontal pod scaling

Each component of Istio has the autoscaling value set to false for the demo profile (using install/kubernetes/istio-demo.yaml). You can set autoscaleEnabled to true for different components in install/kubernetes/helm/istio/values-istio-demo.yaml to enable autoscaling. This configuration may work nicely in production environments based on deployed applications where the autoscaling of pods may help to handle increased workloads.

To get the benefits of autoscaling, we should be careful in selecting the applications since autoscaling applications in high-latency environments can make the situation go from bad to worse in handling the increased workload. 

Pod scaling can be enabled at the time of the Helm installation if the following parameters are passed to the helm install command using the --set argument:

mixer.policy.autoscaleEnabled=true
mixer.telemetry.autoscaleEnabled=true
mixer.ingress-gateway.autoscaleEnabled=true
mixer.egress-gateway.autoscaleEnabled=true
pilot.autoscaleEnabled=true
If you are deploying Istio in a multi-node Kubernetes cluster that has a minimum of three master nodes, it is recommended that you keep the horizontal pod scaling feature to absorb the increased workload.

Follow the steps given here:

  1. Let's check the current autoscaling for every Istio component:
$ kubectl -n istio-system get hpa
No resources found.

  1. If pod scaling is enabled, it can be deleted using the following command. In our case, this is not necessary:
$ kubectl -n istio-system delete hpa --all
horizontalpodautoscaler.autoscaling "istio-egressgateway" deleted
horizontalpodautoscaler.autoscaling "istio-ingressgateway" deleted
horizontalpodautoscaler.autoscaling "istio-pilot" deleted
horizontalpodautoscaler.autoscaling "istio-policy" deleted
horizontalpodautoscaler.autoscaling "istio-telemetry" deleted
  1. After deleting auto pod scaling, make sure to set replicas to 1. In our case, it is not necessary:
$ kubectl -n istio-system scale deploy istio-egressgateway --replicas=1
$ kubectl -n istio-system scale deploy istio-ingressgateway --replicas=1
$ kubectl -n istio-system scale deploy istio-pilot --replicas=1
$ kubectl -n istio-system scale deploy istio-policy --replicas=1
$ kubectl -n istio-system scale deploy istio-telemetry --replicas=1

The promise of a service mesh architecture using a solution such as Istio is to effect changes without having to modify the existing application. This is a significant shift in which operations engineers can run modern microservices applications without having to change anything in the code.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.198.49