Knative uses the regular Kubernetes requests & limits to specify CPU and memory resources to a container.
- requests: what your container is guaranteed to get
- limits: maximum value your container can use (burst, use if available)
apiVersion: serving.knative.dev/v1alpha1 kind: Service metadata: name: hello spec: template: spec: containers: - image: gcr.io/google-samples/hello-app:1.0 resources: requests: cpu: 200m memory: 512M # container may be killed if reaches this value limits: cpu: 500m memory: 1Gi # container is killed if reaches this value
It's recommended to at least specify
requests as it informs Kubernetes