Skip to main content

Set Resource Limits

When you define your Deployment objects, you can specify the CPU and RAM requests for each container instance.

Use the standard Kubernetes methods for specifying your container's requirements.

Example Configuration

The following Deployment has one container defined with a request for 0.5 GiB RAM and 0.5 vCPU.

apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
imagePullPolicy: Always
resources:
requests:
memory: ".5Gi"
cpu: "500m"
limits:
memory: ".5Gi"
cpu: "500m"
ports:
- containerPort: 80

Refer to Kubernetes Docs on managing resources to learn more.

Additional Information

  • Section will set container sizes to a minimum of 0.5 GiB RAM and 0.5 vCPU, with 0.5 increments available.
  • Maximum container sizes are 4 vCPU and 12 GiB.
  • If no container size is specified in your deployment then default container sizes are 1 vCPU and 2 GiB RAM.
  • For more information please refer to the product pricing information to understand how your requests can impact your billing.
  • Section may alter your YAML to ensure that request = limit, which gives a quality of service "Guaranteed".
    • Both request and limit must be specified
    • If request and limit are not equal, Section will use the higher of the two values.
  • You cannot request ephemeral storage directly. Section will automatically apply the ephemeral storage limits when the deployment is created.