Get the App
SLTechnology News&Howtos  ›  Servers  › 

Kubernetes service scheduling

Shulou Source: shulou.com Published: 2022-06-02 18:34:44 10月03日 Update

Kubernetes is very fault tolerant to node nodes. When the node node fails, the pod can drift away, which is more useful when the node is a physical machine. For example, in the case of a physical machine memory failure, the container can drift away automatically and start the service at the same time, avoiding the embarrassment of notifying the application manager to start the service after the physical or virtual machine downtime resumes. This feature is deeply loved by many technical students, and can even be called fault self-healing.

In addition, the Node node cannot avoid occasional downtime or upgrade. In this case, we need to close the policy called on a node node and schedule the newly generated container to other normal service Node nodes. The operation is very simple, but this operation will not affect containers such as pod that are already running on it. Let's make it simple, but demonstrate its operation.

1. Set to non-callable

1. View nodes information Find the node message you want to close kubectl get nodesNAME STATUS ROLES AGE VERSIONcn-shanghai.10.101.175.227 Ready SchedulingDisabled 3d1h v1.14.6-aliyun.12, execute the command to close its scheduling kubectl cordon cn-shanghai.10.101.175.227node/cn-shanghai.10.101.175.227 already cordoned3, and then check its status is no longer able to schedule NAME STATUS ROLES AGE VERSIONcn-shanghai.10.101.175.227 Ready,SchedulingDisabled 3d1h v1.14.6-aliyun.1

We will fail to create related applications because there is only one node node in the whole Kubernetes, and the state of the adjusted node node is unschedulable.

Restore to a callable state

1. Restore to callable kubectl uncordon cn-shanghai.10.101.175.227node/cn-shanghai.10.101.175.227 uncordoned2 and check status kubectl get nodesNAME STATUS ROLES AGE VERSIONcn-shanghai.10.101.175.227 Ready 3d2h v1.14.6-aliyun.1

At this time, let's check that the status of the waiting application above is already running, and at the same time, check the status of the node node is also normal and schedulable.

Tags: Node status scheduling failure inspection service container situation physics application information at the same time adjustable run available awkward next memory only classmate Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei NVidia Linux Shulou Technology Microsoft