kubectl创建模板deployment

kubectl create deploy nginx --image=**nginx:1.14.2**  --replicas=3 -oyaml --dry-run=client > nginx-deploy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  creationTimestamp: null
  labels:
    app: nginx
  name: nginx
spec:
  replicas: 10
  selector:
    matchLabels:
      app: nginx
  strategy: {}
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: nginx
    spec:
      containers:
      - image: nginx:1.14.2
        name: nginx                      
posted @ 2023-02-20 22:51  Yusir-SRE  阅读(160)  评论(0编辑  收藏  举报