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

Introduction to kubernetes's command

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

# query related command [root@master ~] # kubectl get nodes # View the status of each node [root@master ~] # kubectl api-versions # View all versions of API [root@master ~] # kubectl explain deployment.metadata # View the API version corresponding to the Deployment resource object KIND: DeploymentVERSION: extensions/v1beta1 [root@master ~] # kubectl explain pod # View the api version corresponding to the pod resource object KIND: PodVERSION: v1 [root@master ~] # kubectl get pod # query pod brief information [root@master] # kubectl get pod-o wide # query pod details [root@master ~] # kubectl explain service # View api version corresponding to service resource object KIND: ServiceVERSION: v1 [root@master ~] # kubectl get pod-n kube-system # query pod resource pair in kube-system namespace For example, # configure cluster [root@master ~] # kubectl taint node master node-role.kubernetes.io/master- # set master to participate in work [root@master ~] # kubectl taint node master node-role.kubernetes.io/master= "": NoSchedule # set master not to join work [root@master ~] # kubectl label nodes node01 disktype=ssd # label node node01 "disktype=ssd" (custom tag) [root@master ~] # kubectl get nodes-- show-labels # View the nodes tag [root@master ~] # kubectl label nodes node01 disktype- # Delete the "disktype" tag of the ndoe01 node [root@master ~] # kubectl apply-f nginx.yaml # run the resource [root@master ~] # kubectl delete deployment test # delete the controller test according to the yaml file

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