IBM Cloud Docs
Why does the Kubernetes dashboard terminate with an out of memory error?

Why does the Kubernetes dashboard terminate with an out of memory error?

When listing pods in large clusters, the dashboard interface performs poorly and terminates in a OOMKilled error.

Last State:     Terminated
  Reason:       OOMKilled
  Exit Code:    137

The Kubernetes dashboard for your cluster requires a large amount of memory.

You can resolve this issue by changing the resource auto-refresh time interval to 60 for the Kubernetes dashboard.

Changing the resource auto refresh time interval from the Kubernetes dashboard

  1. Select Settings in the navigation pane.
  2. Set Resource auto-refresh time interval to 60.
  3. Save

Changing the resource auto refresh time interval from the command line

Log in to your account. If applicable, target the appropriate resource group. Set the context for your cluster.

  1. Edit your Kubernetes dashboard ConfigMap.

    kubectl -n kube-system edit configmap kubernetes-dashboard-settings
    
  2. In the data._global field, set the resourceAutoRefreshTimeInterval to 60. Example ConfigMap with resourceAutoRefreshTimeInterval set to 60.

    apiVersion: v1
    data:
    _global: '{"clusterName":"mycluster","itemsPerPage":10,"logsAutoRefreshTimeInterval":5,"resourceAutoRefreshTimeInterval":60}'
    kind: ConfigMap
    metadata:
    creationTimestamp: "2021-06-08T04:23:35Z"
    labels:
        addonmanager.kubernetes.io/mode: EnsureExists
        k8s-app: kubernetes-dashboard
    name: kubernetes-dashboard-settings
    namespace: kube-system
    resourceVersion: "1253"
    uid: c1d39cdb-329e-4cf4-b714-954178984a53
    
  3. Exit the editor.

  4. Find the pod name for the kubenertes-dashboard pod.

    kubectl -n kube-system get pods | grep kubernetes-dashboard
    
    kubernetes-dashboard-549b67cb67-24pft                 1/1     Running   0          40d
    
  5. Restart the dashboard by deleting the kubernetes-dashboard pod.

    kubectl -n kube-system delete pod kubernetes-dashboard-xxx