-
用create命令生成
kubectl create deployment nginx --image=nginx:1.16 -o yaml --dry-run=client > my-deploy.yaml -
用get命令导出
kubectl get deploymentnginx-o yaml > my-deploy.yaml -
Pod容器的字段拼写忘记了
kubectl explain pods.spec.containers
kubectl explain deployment
相关文章
- 12-19k8s-YAML字段太多,记不住怎么办