Is there any way to disable k8s rescheduler?

12/6/2017

I don't want k8s to transfer any pod to another node even the node lost.Because i use hostPath,if the pod rescheduled,the data will lost.

Is there any way to disable rescheduler?

-- Baby.zhou
kubernetes

1 Answer

12/6/2017

I don't know how to disable rescheduler.

But you can limit this pod to specific node via nodeSelector, or you can use nodeName.

apiVersion: v1
kind: Pod
metadata:
  name: nginx
  labels:
    env: test
spec:
  containers:
  - name: nginx
    image: nginx
  nodeSelector:
    kubernetes.io/hostname: yourNodeName

Note: nodeName will ignore the node which is cordon(kubectl cordon) and has taint.

-- ChunTingLin
Source: StackOverflow