--dry-run=client #尝试本地运行,但不会真的部署
-o yaml #导出为yaml格式文件
kubectl create deployment nginx --image=nginx -o yaml --dry-run=client > deployment.yaml
kubectl get deployment nginx -o yaml #导出已经部署的deployment yaml
--dry-run=client #尝试本地运行,但不会真的部署
-o yaml #导出为yaml格式文件
kubectl create deployment nginx --image=nginx -o yaml --dry-run=client > deployment.yaml
kubectl get deployment nginx -o yaml #导出已经部署的deployment yaml