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

How to write the java code of kubernates management host host

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

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "how to write the java code of the kubernates management host host". In the daily operation, I believe that many people have doubts about how to write the java code of the kubernates management host host. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "how to write the java code of the kubernates management host host". Next, please follow the editor to study!

Introduction to node:

Node is the working host in the kubernates cluster, which can be a physical machine or a virtual machine. Node is managed by master, and kubelete and docker are run on it. You can use node controller to manage node. Creating node will create node objects inside the kubernates system, and you can also modify node, isolate, and so on.

First, add host code

Note: cannot add a host with the same name, hostName: cannot be repeated.

Kind: the resource type must be specified as node, apiVersion: corresponds to the kubernates version.

Tags and partitions are map types, and multiple tags can be added.

After a successful addition:

Note: the check failed when the status is the host of notready, and the service cannot be started on it to create a pod.

II. Host query

All the above operations need to be found on the host before they can be carried out.

A. Query the list of all hosts

B. Query a node (filter according to conditions)

If the nodeName setting is unique, this method can find the node you want.

C. Query images, storage, pod, etc., on node.

Partial screenshot of the result obtained by the query:

Third, set the host to be unscheduled

After setting, the status will change from ready to Ready,SchedulingDisabled.

Set the host to be schedulable

By the same token, the state changes from Ready,SchedulingDisabled to ready when the setting is complete.

5. Modify the host label

The label of the host is very important. When creating a pod, the pod will randomly dispatch the host. We don't know which node he created on.

Through node's label and pod's nodeSelector, we can specify the node to which the pod is created.

VI. Delete host object

Delete it according to the name, or delete it all

Note: the deletion operation requires a lot of verification before deleting.

At this point, the study on "how to write the java code of kubernates management host host" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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