Operator pod is killed because it is out of memory - OOMKilled

When you install IBM Cloud Pak foundational services, some operator pods crash due out-of-memory issues.

Symptom

The operator pod continuously shows the CrashLoopBackOff status.

The description of pod indicates that the Reason is OOMKilled.

  1. Get the pod name and status.

    oc get pods -n ibm-common-services
    
  2. Get details of the pod that is crashing.

    oc describe pod <name-of-the-pod-that-is-crashing-> -n ibm-common-services
    

    Following is a sample output:

    State:          Waiting
     Reason:       CrashLoopBackOff
    Last State:     Terminated
     Reason:       OOMKilled
     Exit Code:    137
     Started:      Wed, 23 Sep 2020 10:53:24 -0700
     Finished:     Wed, 23 Sep 2020 10:54:24 -0700
    Ready:          False
    

Cause

The configured memory limit of the operator pod is not sufficient.

Resolving the problem

Increase the resource limits of the operator pods that are crashing.

Complete these steps for each pod that is crashing:

  1. Get the ClusterServiceVersion(CSV) name of the operator.

    oc -n ibm-common-services get csv | grep <operator-name>
    
  2. Edit the CSV of the operator.

    oc -n ibm-common-services edit csv <operator-CSV-name>
    
  3. Increase the value of the memory limit parameter in the .spec.install.spec.deployments[0].spec.template.spec.container[0].resources.limits.memory section.

    spec:
     containers:
     - command:
       - operator name
       resources:
         limits:
           cpu: 50m
           memory: 128Mi
         requests:        
           cpu: 20m
           memory: 64Mi