Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What are the common commands in Kubenetes

Shulou Source: shulou.com Published: 2022-06-02 08:46:17 10月02日 Update

This article mainly introduces "what are the common commands in Kubenetes". In daily operation, I believe many people have doubts about the common commands in Kubenetes. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful for you to answer the doubts about "what are the common commands in Kubenetes?" Next, please follow the editor to study!

In kubernetes, we often use the command kubectl label to run application on a qualified node in conjunction with the installation script of helm. This article is mainly used to record some basic uses. For more usage, please refer to http://docs.kubernetes.org.cn/628.html.

1 Grammar

$label [--overwrite] (- f FILENAME | TYPE NAME) KEY_1=VAL_1... KEY_N=VAL_N [--resource-version=version]

2 exercises

In this example, tag-related operations are performed for pods. You can modify it to other resources according to your actual situation, such as node

2.1 View existing tags

Kubectl get pods-show-labels

2.2 add a new tag

Kubectl label pods foo unhealthy=true

2.3 Delete existing tags

At this point in kubectl label pods foo unhealthy-, the study of "what are the common commands in Kubenetes" 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!

Tags: Commands frequently used tags learning more methods articles help practical next usage practice regular meetings situations articles conditions theories knowledge examples websites Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Shulou Tech Info OPPO Reno Linux MySQL