Configure resource requests and limits

You can configure resource limits and requests, specifically for CPU and memory, for individual Knative services.

The following example shows how you can set the requests and limits fields for a service:

  1. apiVersion: serving.knative.dev/v1
  2. kind: Service
  3. metadata:
  4. name: example-service
  5. namespace: default
  6. spec:
  7. template:
  8. spec:
  9. containers:
  10. - image: docker.io/user/example-app
  11. resources:
  12. requests:
  13. cpu: 100m
  14. memory: 640M
  15. limits:
  16. cpu: 1

Additional resources