k8s快速生成yaml格式文件命令
作者:互联网
kubectl create deployment web --image=nginx -o yaml --dry-run >my1.yaml
然后会生成到当前目录下的my1.yaml文件里
内容如下
apiVersion: apps/v1 kind: Deployment metadata: creationTimestamp: null labels: app: web name: web spec: replicas: 1 selector: matchLabels: app: web strategy: {} template: metadata: creationTimestamp: null labels: app: web spec: containers: - image: nginx name: nginx resources: {} status: {}
标签:web,nginx,app,labels,格式文件,yaml,k8s,image 来源: https://www.cnblogs.com/pxblog/p/15757712.html