Restruct and reorder chapters

This commit is contained in:
Baohua Yang
2026-02-21 22:22:17 -08:00
parent 2ab40eacc0
commit 33af380be1
141 changed files with 154 additions and 182 deletions

View File

@@ -0,0 +1,81 @@
# kubectl 使用
[kubectl](https://github.com/kubernetes/kubernetes) 是 Kubernetes 自带的客户端,可以用它来直接操作 Kubernetes。
使用格式有两种
```bash
kubectl [flags]
kubectl [command]
```
## get
显示一个或多个资源
## describe
显示资源详情
## create
从文件或标准输入创建资源
## update
从文件或标准输入更新资源
## delete
通过文件名标准输入资源名或者 label selector 删除资源
## logs
输出 pod 中一个容器的日志
## rollout
Deployment 等资源执行滚动更新/回滚
## exec
在容器内部执行命令
## port-forward
将本地端口转发到 Pod
## proxy
Kubernetes API server 启动代理服务器
## run
在集群中使用指定镜像启动容器
## expose
replication controller service pod 暴露为新的 Kubernetes service
## label
更新资源的 label
## config
修改 Kubernetes 配置文件
## cluster-info
显示集群信息
## api-versions
/版本 的格式输出服务端支持的 API 版本
## version
输出服务端和客户端的版本信息
## help
显示各个命令的帮助信息