Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Kubernetes service scheduling

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report