共计 461 个字符,预计需要花费 2 分钟才能阅读完成。
kubectl
kubectl [command] [TYPE] [NAME] [flags]
-
command
create
get
delete
describe
-
TYPE
(to specify resource types)kubectl get pod pod1 kubectl get pods pod1 kubectl get po pod1
NAME
(to specify resource name, if not specified, list all the resources)
Generate a yaml
-
kubectl create
# Generate a yaml but not actually create the deployment kubectl create deployment DeployTest --image=nginx -o yaml --dry-run kubectl create deployment DeployTest --image=nginx -o yaml --dry-run > m1.yaml
- kubectl get
Export a yaml from a deployed application
正文完
发表至: kubernetes
2021-10-11