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-refresh
time 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._global
field, set theresourceAutoRefreshTimeInterval
to60
. Example ConfigMap withresourceAutoRefreshTimeInterval
set 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-dashboard
pod.kubectl -n kube-system get pods | grep kubernetes-dashboard
kubernetes-dashboard-549b67cb67-24pft 1/1 Running 0 40d
-
Restart the dashboard by deleting the
kubernetes-dashboard
pod.kubectl -n kube-system delete pod kubernetes-dashboard-xxx