From 0e87b70fbf8e6a10d0ac3ef074f6f1653c2c8b5f Mon Sep 17 00:00:00 2001 From: Baohua Yang Date: Mon, 8 Jun 2015 10:32:13 +0800 Subject: [PATCH] Add the section of kubectl, to be filled --- SUMMARY.md | 1 + kubernetes/kubectl.md | 51 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 kubernetes/kubectl.md diff --git a/SUMMARY.md b/SUMMARY.md index c451b53..8475bae 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -103,6 +103,7 @@ * [简介](kubernetes/intro.md) * [快速上手](kubernetes/quickstart.md) * [架构设计](kubernetes/design.md) + * [kubectl 使用](kubernetes/kubectl.md) * [附录一:命令查询](appendix_command/README.md) * [附录二:常见仓库介绍](appendix_repo/README.md) * [Ubuntu](appendix_repo/ubuntu.md) diff --git a/kubernetes/kubectl.md b/kubernetes/kubectl.md new file mode 100644 index 0000000..1c186b6 --- /dev/null +++ b/kubernetes/kubectl.md @@ -0,0 +1,51 @@ +# kubectl 使用 +[kubectl](https://github.com/GoogleCloudPlatform/kubernetes) 是 Kubernetes 自带的客户端,可以用它来直接操作 Kubernetes。 + +使用格式有两种: +```sh +kubectl [flags] +kubectl [command] +``` + +## get +Display one or many resources +## describe +Show details of a specific resource +## create +Create a resource by filename or stdin +## update +Update a resource by filename or stdin. +## delete +Delete a resource by filename, stdin, resource and ID, or by resources and label selector. +## namespace +SUPERCEDED: Set and view the current Kubernetes namespace +## log +Print the logs for a container in a pod. +## rolling-update +Perform a rolling update of the given ReplicationController. +## resize +Set a new size for a Replication Controller. +## exec +Execute a command in a container. +## port-forward +Forward one or more local ports to a pod. +## proxy +Run a proxy to the Kubernetes API server +## run-container +Run a particular image on the cluster. +## stop +Gracefully shut down a resource by id or filename. +## expose +Take a replicated application and expose it as Kubernetes Service +## label +Update the labels on a resource +## config +config modifies kubeconfig files +## cluster-info +Display cluster info +## api-versions +Print available API versions. +## version +Print the client and server version information. +## help +Help about any command