发布于 2015-09-22 15:50:55 | 1235 次阅读 | 评论: 0 | 来源: 网络整理
kubectl 是 Kubernetes 自带的客户端,可以用它来直接操作 Kubernetes。
使用格式有两种:
kubectl [flags]
kubectl [command]
Display one or many resources
Show details of a specific resource
Create a resource by filename or stdin
Update a resource by filename or stdin.
Delete a resource by filename, stdin, resource and ID, or by resources and label selector.
SUPERCEDED: Set and view the current Kubernetes namespace
Print the logs for a container in a pod.
Perform a rolling update of the given ReplicationController.
Set a new size for a Replication Controller.
Execute a command in a container.
Forward one or more local ports to a pod.
Run a proxy to the Kubernetes API server
Run a particular image on the cluster.
Gracefully shut down a resource by id or filename.
Take a replicated application and expose it as Kubernetes Service
Update the labels on a resource
config modifies kubeconfig files
Display cluster info
Print available API versions.
Print the client and server version information.
Help about any command