<p>I have created an EC2 and install EKS on it.Then i created cluster and install docker image on it.
Now i'm trying to deploy this image to the docker container using given yaml and getting error.</p>

<pre><code>Error in creating Deployment YAML on kubernetes 
spec.template.spec.containers[1].image: Required value
spec.template.spec.containers[2].image: Required value
</code></pre>

<p>--i can see the image on ec2 docker.
my yaml is like this:</p>

<pre><code>apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: premiumservice
  labels:
    app: premium-service
  namespace: 
  annotations:
    monitoring: "true"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: premium-service
  template:
    metadata:
      labels:
        app: premium-service
    spec:
      containers:
      - image: "mp3-image1:latest" 
        name: premiumservice
        ports:
        - containerPort: 80
        env:
      - name: type1
        value: "xyz"
      - name: type2
        value: "abc"
</code></pre>

<p>The deployment yaml have indentation problem near the env section and should look like below:</p>

<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: premiumservice
  labels:
    app: premium-service
  namespace:
  annotations:
    monitoring: "true"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: premium-service
  template:
    metadata:
      labels:
        app: premium-service
    spec:
      containers:
      - image: mp3-image1:latest
        name: premiumservice
        ports:
        - containerPort: 80
        env:
          - name: type1
            value: "xyz"
          - name: type2
            value: "abc"
</code></pre>
