<p>I have a manifest of a Kubernetes <code>Deployment</code>. When I try to deploy it from Azure Devops, I get the following error:</p>
<pre><code>error: error validating &quot;/home/vsts/work/r1/a/_MozCom-Ace-QTR/beta/ace-ui-deploy.yaml&quot;: error validating data: ValidationError(Deployment.spec.template.spec.containers[0].env[13]): missing required field &quot;name&quot; in io.k8s.api.core.v1.EnvVar; if you choose to ignore these errors, turn validation off with --validate=false
</code></pre>
<p><a href="https://i.stack.imgur.com/C5Vuw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C5Vuw.png" alt="enter image description here" /></a></p>
<p><a href="https://i.stack.imgur.com/giFzw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/giFzw.png" alt="enter image description here" /></a>
<a href="https://i.stack.imgur.com/n1Z7m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/n1Z7m.png" alt="enter image description here" /></a></p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: abc-ui
  namespace: abcqat-frontend
spec:
  replicas: 1
  selector:
    matchLabels:
      app: abc-ui
  template:
    metadata:
      labels:
        app: abc-ui
    spec:
      containers:
        - name: abc-ui
          image: abc.azurecr.io/mozcom-abc-ui-mig:65272
          imagePullPolicy: Always
          ports:
            - containerPort: 3883
              name: abc-ui
          readinessProbe:
               httpGet:
                   path: /health-probe
                   port: 3883
               initialDelaySeconds: 15
               periodSeconds: 10
               timeoutSeconds: 5
          livenessProbe:
              httpGet:
                  path: /health-probe
                  port: 3883
              initialDelaySeconds: 15
              periodSeconds: 10
              timeoutSeconds: 5
          env:
            - name: ENVIRONMENT
              value: PROD
            - name: PORT
              value: &quot;3883&quot;
            - name: DISABLE_CONSTRUCT_API_URL
              value: &quot;true&quot;
            - name: APP_API_HOST
              value: https://afgabcqtr-webapi-beta.mozcomtest.com
            - name: APP_API_PROTOCOL
              value: &quot;https:&quot;
            - name: SITE_NAME_SEPARATOR
              value: &quot;-&quot;
            - name: AUTH_SERVER_HOST
              value: https://afgabcqtr-cas-beta.mozcomtest.com
            - name: GOOGLE_MAP_KEY
              valueFrom:
                secretKeyRef:
                  name: mozcom-env-secret
                  key: googleMapKey
            - name: BASIC_AUTH_ENABLED
              value: &quot;true&quot;
            - name: BASIC_AUTH_USER
              value: mozcomabc
            - name: BASIC_AUTH_PASSWORD
              value: afgabclive
            - name: AKS_UNIQUE_KEY_DEPLOY_DATE
              value: REPLabc_WITH_DATE_STAMP
            - name: SENTRY_DNS 
              value: &quot;https://02e9ff2a5d6b4cd4a253f32de9237ca5@o537716.ingest.sentry.io/5658030&quot;
            - name: APPLE_PAY_MERCHANT_ID
              value: merchant.com.alfuttaim.abcuae
            - name: LOG_ROCKET_ID
              value: pjpo3x/abc
            - name: APP_API_INTERNAL_HOST
              value: 'http://web-api:8071'
            - name: AUTH_SERVER_INTERNAL_HOST
              value: 'http://cas-server:6443'
            - name: ALGOLIA_BRAND
              value: mozanta_abc
            - name: BRAND
              value: abc
            - name: APPLICATION_ID
              value: 6DAMKJX8YE
            - name: SEARCH_API_KEY
              value: 85e7bf88034b7bc60b7f0085683a19af
</code></pre>

AKHIL KUMAR
<p>The error indicates that you're missing <code>name</code> attribute/field in 14th environment variable (<code>spec.containers[0].env[13]</code>) of the container. However, in the manifest shared above there are no environment variables written.</p>
<p>Can you share the complete manifest file?</p>
