Kubernetes notes (3)--kubectl and Cobra

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

kubectlis k8s clustet manager the command-line tool for control:

$ kubectlkubectl controls the Kubernetes cluster manager.Find more information at https://github.com/kubernetes/kubernetes.Usage:  kubectl [flags]  kubectl [command]Available Commands:  get            Display one or many resources  describe       Show details of a specific resource or group of resources......

kubectlUsing the Cobra this project as a tool for building the command line, it contains commands , args and flags the concept of:

Commands represent actions, Args are things and Flags are modifiers for those actions.The pattern to follow is APPNAME VERB NOUN --ADJECTIVE. or APPNAME COMMAND ARG --FLAG

As an example:

$ kubectl get node --v=10

kubectlYes, yes, appname get command node Yes arg , --v=10 Yes flag .

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.