Deployment invalid: spec.template.metadata.labels: Invalid value

前端 未结 2 1895
攒了一身酷
攒了一身酷 2021-01-01 11:21

Deploying my service to production:

envsubst < ./kubernetes/pre-production/aks.yaml | kubectl apply -f -

I\'m getting the following erro

2条回答
  •  忘掉有多难
    2021-01-01 11:37

    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: backend-security-deployment
    spec:
      replicas: 2
      selector:
        matchLabels:
          app: backend-security
      template:
        metadata:
          labels: # labels to select/identify the deployment
            app: backend-security
        spec:     # pod spec                  
          containers: 
          - name: backend-security
            image: yurifull/backend-security:v1.0.0 # image we pushed
            ports:
            - containerPort: 3001
    

    this works for me...

提交回复
热议问题