Overriding pod CPU and memory settings

Use template overrides to set a higher CPU and memory for your gateway pod.

About this task

Important: The recommended method to increase the resources for your API Connect deployment is to change deployment profile:

Increasing the number of CPUs impacts API Connect licensing. See Deployment and component profiles.

Note: For OpenShift users: The example steps in this topic use the Kubernetes kubectl command. On OpenShift, use the equivalent oc command in its place. If you are using a top-level CR (APIConnectCluster), ensure that the spec.gateway section is included. If it is not included already, you must add the spec.gateway section before adding the required property within it.

Procedure

  1. Edit the gateway CR:
    kubectl edit gw
  2. Add a spec.template section with the new memory and CPU settings. For example:
      template:
      - name: datapower
        containers:
        - name: gateway
          resources:
            limits:
              cpu: 4
              memory:  12Gi
            requests:
              cpu: 2
              memory: 10Gi 
    Note:

    The default memory limit and request is 8Gi. The memory limit must always be greater than or equal to the memory request.

    For information about overriding other properties, see Overriding the default DataPower image, version, and license.

    The template override mechanism is specific only to the CPU and memory values, and cannot be used for other resource requests in the DataPower Gateway CR.