kubectl 是控制 Kubernetes 的集群管理器。 详情查看 https://github.com/kubernetes/kubernetes 用法: kubectl [flags] kubectl [command] 可用命令: get 显示一个或多个资源 describe 显示指定资源或一组资源的详细信息 create 经过文件名 或 标准输入建立一个资源 replace 经过文件名或标准输入替换资源 patch Update field(s) of a resource using strategic merge patch. delete Delete resources by filenames, stdin, resources and names, or by resources and label selector. edit 编辑资源 apply Apply a configuration to a resource by filename or stdin namespace SUPERSEDED: Set and view the current Kubernetes namespace logs 打印在 POD 容器中的日志 rolling-update Perform a rolling update of the given ReplicationController. scale Set a new size for a Replication Controller, Job, or Deployment. attach Attach 到容器中 exec 在容器中执行命令 port-forward 装法一个或多个本地端口到 pod. proxy 运行 Kubernetes API Server 代理 run 集群上运行特定镜像 expose Take a replication controller, service or pod and expose it as a new Kubernetes Service autoscale 自动衡量部署和冗余调节 label 更新 资源上的 labels annotate 更新资源上的 annotations config 配置修改 kubeconfig 文件 cluster-info 显示集群信息 api-versions Print the supported API versions on the server, in the form of "group/version". version Print the client and server version information. explain Documentation of resources. convert Convert config files between different API versions Flags: --alsologtostderr[=false]: log to standard error as well as files --api-version="": The API version to use when talking to the server --certificate-authority="": Path to a cert. file for the certificate authority. --client-certificate="": Path to a client certificate file for TLS. --client-key="": Path to a client key file for TLS. --cluster="": The name of the kubeconfig cluster to use --context="": The name of the kubeconfig context to use -h, --help[=false]: help for kubectl --insecure-skip-tls-verify[=false]: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure. --kubeconfig="": Path to the kubeconfig file to use for CLI requests. --log-backtrace-at=:0: when logging hits line file:N, emit a stack trace --log-dir="": If non-empty, write log files in this directory --log-flush-frequency=5s: Maximum number of seconds between log flushes --logtostderr[=true]: log to standard error instead of files --match-server-version[=false]: Require server version to match client version --namespace="": If present, the namespace scope for this CLI request. --password="": Password for basic authentication to the API server. -s, --server="": The address and port of the Kubernetes API server --stderrthreshold=2: logs at or above this threshold go to stderr --token="": Bearer token for authentication to the API server. --user="": The name of the kubeconfig user to use --username="": Username for basic authentication to the API server. --v=0: log level for V logs --vmodule=: comma-separated list of pattern=N settings for file-filtered logging