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
- Select Settings in the navigation pane.
- Set
Resource auto-refreshtime interval to60. Save
Changing the resource auto refresh time interval from the command line
-
Edit your Kubernetes dashboard ConfigMap.
kubectl -n kube-system edit configmap kubernetes-dashboard-settings -
In the
data._globalfield, set theresourceAutoRefreshTimeIntervalto60. Example ConfigMap withresourceAutoRefreshTimeIntervalset to60.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 -
Exit the editor.
-
Find the pod name for the
kubenertes-dashboardpod.kubectl -n kube-system get pods | grep kubernetes-dashboardkubernetes-dashboard-549b67cb67-24pft 1/1 Running 0 40d -
Restart the dashboard by deleting the
kubernetes-dashboardpod.kubectl -n kube-system delete pod kubernetes-dashboard-xxx