How Do I Change the Resource Requests of the istio-proxy Container?
The default resources of the istio-proxy container are as follows. You can change the resources as required.
resources: limits: cpu: "2" memory: 512Mi requests: cpu: "1" memory: 512Mi
Method 1: Modify the Configuration for All Services in the Mesh
Do as follow to change the resource requests configuration of the istio-proxy container for all services in the mesh at a time:
- Run the following command to modify the ConfigMap:
kubectl edit cm istio-sidecar-injector -n istio-system
- Restart the istio-sidecar-injector pod in the istio-system namespace.
- Restart service pods in the rolling upgrade mode to avoid service interruption.
Method 2: Modify the Configuration for A Specific Service in the Mesh
- Modify the YAML file of the service.
kubectl edit deploy <nginx> -n <namespace>
- Add the following configuration lines to spec.template.metadata.annotations (you can change the resource size as required).
sidecar.istio.io/proxyCPU: 500m sidecar.istio.io/proxyLimitCPU: 500m sidecar.istio.io/proxyLimitMemory: 1024Mi sidecar.istio.io/proxyMemory: 1024Mi
For meshes of Istio 1.8, add the following configuration lines:
sidecar.istio.io/proxyCPU: 500m sidecar.istio.io/proxyCPULimit: 500m sidecar.istio.io/proxyMemoryLimit: 1024Mi sidecar.istio.io/proxyMemory: 1024Mi
- After the modification, restart service pods in the rolling upgrade mode to avoid service interruption.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot