How to set a deployment replica faster(liveness probe doesn't work)?

Asking for help? Comment out what you need so we can get more information to help you!

Cluster information:

Kubernetes version: v1.21.2
Cloud being used: (put bare-metal if not on a public cloud) bare-metal
Installation method: manual
Host OS: centos 7
CNI and version: weave
CRI and version:

You can format your yaml by highlighting it and pressing Ctrl-Shift-C, it will make your output easier to read.

Hi, I have a cluster, here my test:
Scale a deployment to 1 replica.
Shutdown the node with the pod.
Wait until the pod is replicated on another node.
It takes 5 minutes, I need to do this in few seconds.
I have tried with liveness probe but nothing is changed. Thanks.
How can I set a faster replica?

        livenessProbe:
          httpGet:
            path: /
            port: 8085
          initialDelaySeconds: 2 
          periodSeconds: 1 
          timeoutSeconds: 1  
          successThreshold: 1 
          failureThreshold: 1

I think the term you’re looking for is eviction time. Check out this part of the documentation.

If you need high availability, you shouldn’t rely on failover. You should use a deployment or statefulset that runs multiple pods with the node affinity set so they aren’t going to be dumped onto the same node.