openkruise / kruise

Automated management of large-scale applications on Kubernetes (incubating project under CNCF)
https://openkruise.io
Other
4.68k stars 769 forks source link

[BUG] When draining a node, an error about unknown DaemonSet occurs. #1831

Open alexey-gavrilov-flant opened 1 week ago

alexey-gavrilov-flant commented 1 week ago

What happened: The drain from kubelet cannot correctly map kind: DaemonSet from kruise to its pod. kubectl drain s-shared-ks-loadbalancer-d421333b-7c596-w4snd

image image

Also there is an assumption that the same behavior for StatefulSet and Deployments.

What you expected to happen: No errors when executing drain node.

How to reproduce it (as minimally and precisely as possible):

  1. usage DaemonSet kruise
  2. kubectl drain node

Anything else we need to know?:

A patch was made for DaemonSet in upstrim. I hope that you can add a drain fix for the other components. https://github.com/kubernetes/kubernetes/pull/128779 https://github.com/kubernetes/kubernetes/pull/101556 https://github.com/kubernetes/kubernetes/issues/101557

Environment: