Skip to content

Commit 0e87b70

Browse files
committed
Add the section of kubectl, to be filled
1 parent 03b1d1f commit 0e87b70

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
* [简介](kubernetes/intro.md)
104104
* [快速上手](kubernetes/quickstart.md)
105105
* [架构设计](kubernetes/design.md)
106+
* [kubectl 使用](kubernetes/kubectl.md)
106107
* [附录一:命令查询](appendix_command/README.md)
107108
* [附录二:常见仓库介绍](appendix_repo/README.md)
108109
* [Ubuntu](appendix_repo/ubuntu.md)

kubernetes/kubectl.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# kubectl 使用
2+
[kubectl](https://github.com/GoogleCloudPlatform/kubernetes) 是 Kubernetes 自带的客户端,可以用它来直接操作 Kubernetes。
3+
4+
使用格式有两种:
5+
```sh
6+
kubectl [flags]
7+
kubectl [command]
8+
```
9+
10+
## get
11+
Display one or many resources
12+
## describe
13+
Show details of a specific resource
14+
## create
15+
Create a resource by filename or stdin
16+
## update
17+
Update a resource by filename or stdin.
18+
## delete
19+
Delete a resource by filename, stdin, resource and ID, or by resources and label selector.
20+
## namespace
21+
SUPERCEDED: Set and view the current Kubernetes namespace
22+
## log
23+
Print the logs for a container in a pod.
24+
## rolling-update
25+
Perform a rolling update of the given ReplicationController.
26+
## resize
27+
Set a new size for a Replication Controller.
28+
## exec
29+
Execute a command in a container.
30+
## port-forward
31+
Forward one or more local ports to a pod.
32+
## proxy
33+
Run a proxy to the Kubernetes API server
34+
## run-container
35+
Run a particular image on the cluster.
36+
## stop
37+
Gracefully shut down a resource by id or filename.
38+
## expose
39+
Take a replicated application and expose it as Kubernetes Service
40+
## label
41+
Update the labels on a resource
42+
## config
43+
config modifies kubeconfig files
44+
## cluster-info
45+
Display cluster info
46+
## api-versions
47+
Print available API versions.
48+
## version
49+
Print the client and server version information.
50+
## help
51+
Help about any command

0 commit comments

Comments
 (0)