How to drain z2jh node?

Hello, members.

Does anyone tell me how to drain z2jh nodes? (For example, restart node for apt update)
Is my following understand correct?

Best regards.

1. drain command.

Is the command
kubectl drain k8s-node --delete-emptydir-data --ignore-daemonsets --force ?

IIUC, It need --ignore-daemonsets, --force options.
If --force option not set, It will fail with message
cannot delete Pods declare no controller (use --force to override): z2jh/jupyter-bob

If --ignore-daemonsets not set, It will fail with message
cannot delete DaemonSet-managed Pods (use --ignore-daemonsets to ignore): kube-flannel/kube-flannel-ds-f62qd, kube-system/kube-proxy-tk9qg, z2jh/continuous-image-puller-4hwlk...

2. what pod evicting? and what pod restart on another node.

After kubectl drain k8s-node --delete-emptydir-data --ignore-daemonsets --force It evicting the folloiwng pods, and those pods will run on another node.

  • z2jh/hub-85c67c586-dtbn5
  • z2jh/proxy-69df865d6c-44xcw
  • z2jh/user-scheduler-67967755db-tg9t4,

3. continuous-image-puller never stop.

Due to the pod is managed by daemonsets, z2jh/continuous-image-puller-qqw8g doesn’t not stop.

4. user pod doesn’t start automatically

jupyter-bob (bob is the username) doesn’t start automatically, It respawn if user push restart button on WebUI.

5. Environment

  • Kubernetes 1.29.3
  • helm chart: jupyterhub-3.1.0
  • helm App version: 4.0.2
  • OS: Ubuntu 22.04