lensapp / lens

Lens - The way the world runs Kubernetes
https://k8slens.dev/
MIT License
22.53k stars 1.47k forks source link

lens-metrics breaks if original node of prometheus-0 pod is shut down #1216

Open cerebrate opened 4 years ago

cerebrate commented 4 years ago

The lens-metrics/prometheus-0 pod cannot be scheduled on any node other than that which it was first scheduled on. This appears to be because of the Persistent Volume Claim for the data volume.

Steps to reproduce the behavior:

  1. Cordon the node on which the prometheus-0 pod is running.
  2. Drain the node on which the prometheus-0 pod is running.
  3. Observe events of the form:

0/5 nodes are available: 1 Insufficient memory, 1 node(s) were unschedulable, 3 node(s) had volume node affinity conflict.

And that the pod remains in a perpetual pending state.

Expected behavior

The prometheus-0 pod to be rescheduled and run successfully on another node.

Environment (please complete the following information):

Kubeconfig: Quite often the problems are caused by malformed kubeconfig which the application tries to load. Please share your kubeconfig, remember to remove any secret and sensitive information.

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: [REDACTED]
    server: https://twilight-sparkle.arkane-systems.lan:6443
  name: default
contexts:
- context:
    cluster: default
    user: default
  name: default
current-context: default
kind: Config
preferences: {}
users:
- name: default
  user:
    client-certificate-data: [REDACTED]
    client-key-data: [REDACTED]
Nokel81 commented 3 years ago

I assume this is still a problem in 4.1.4?

cerebrate commented 3 years ago

Presumably - unfortunately, since opening this issue, my cluster's been upgraded to use prometheus-operator based metrics, so I can't confirm that at this instant. I'll update this when I can find time and hardware to put a suitable test setup together.

cerebrate commented 3 years ago

Found the time; yes, it is. Looks like the issue is the local PV it uses, to me.