Kubernetes node to node fault tolerance is very good, when the node node fails, pod may drift away, in case of node is a physical machine are good enough, for example, when the physical machine memory and other failures, the container can be automatically drift away, while the service will start to avoid before the physical machine or virtual machine downtime recovery, but also embarrassed notify the person in charge to start the application services. This feature loved by many technology students, and even can be called self-healing.
In addition, Node node can not avoid the occasional downtime or an upgrade, this time we need to turn off call to a station node node strategy will dispatch vessel newly generated to Node node other normal service operation is very simple, but this action It will not affect already running above the pod and other containers. Next we show you simple but its operation
First, the call can not be set to
1, view nodes information, you want to close the node to find information kubectl GET nodes NAME AGE VERSION the STATUS the ROLES CN-shanghai.10.101.175.227 Ready, SchedulingDisabled <none> 3D1H v1.14.6-aliyun.1 2, execute the command to close its dispatch kubectl cordon shanghai.10.101.175.227-CN Node / CN-shanghai.10.101.175.227 already cordoned . 3, again check the status has not scheduled NAME VERSION the sTATUS the ROLES of AGE CN-shanghai.10.101.175.227 the Ready, SchedulingDisabled <none> 3D1H v1.14.6 -aliyun.1
We could create related applications will fail, because the whole Kubernetes only one node node node node status is adjusted is not scheduled.
Second, you can call back to the state
1, may be invoked to restore kubectl uncordon shanghai.10.101.175.227-CN Node / shanghai.10.101.175.227 uncordoned CN- 2, checks the status kubectl GET Nodes NAME VERSION the STATUS the ROLES of AGE CN-shanghai.10.101.175.227 the Ready <none> V1 3d2h .14.6-aliyun.1
This time we go check the above application in waiting state is already running, and go check node node status is normal can be scheduled