How to configure default and workload specific Istio envoy sidecar resource limits in Rancher v2.5

Follow
Table of Contents

Task

This is a short guide on how to apply resource limits to Istio's Envoy Sidecars.

Pre-requisites

  • Rancher version 2.5.x
  • Istio installed via the new Cluster Explorer

Steps

Per pod

Istio provides resource annotations to adjust the sidecar resource limits on a per workload basis, via the annotations sidecar.istio.io/proxyMemoryLimit and sidecar.istio.io/proxyCPULimit on the Pod spec like this example:

apiVersion: apps/v1
kind: Deployment
  name: deployment-plus-sidecar
metadata:
  template:
    metadata:
      annotations:
        sidecar.istio.io/proxyCPU: 111m
        sidecar.istio.io/proxyCPULimit: 222m
        sidecar.istio.io/proxyMemory: 111Mi
        sidecar.istio.io/proxyMemoryLimit: 222Mi
    spec:
      containers:
        name: nginx
        image: nginx

Global Default

To set default limits for all sidecars install Istio or Edit/Upgrade the existing App, then navigate to Custom Overlay file. From there you can edit the IstioOperator YAML by hand. To set default limits edit it to resemble the following:

apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
  values:
    global:
      proxy:
        resources:
          limits:
            memory: 512Mi
            cpu: 1500m
          requests:
            memory: 128Mi            
            cpu: 100m 

Further reading

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.