<p>I'm trying to create an Ingress resource on EKS (AWS Kubernetes).</p>

<p>When doing <code>kubect get all</code> I have:</p>

<pre><code>NAME                                                       READY   STATUS    RESTARTS   AGE
pod/auth-demo-6dfb9b5d78-n8znm                             1/1     Running   0          36m
pod/mysql-79945f6847-8jsss                                 1/1     Running   0          4d
pod/ngnix-nginx-ingress-controller-54988f47d7-k4j5h        1/1     Running   0          64m
pod/ngnix-nginx-ingress-default-backend-77457bd5ff-dppwr   1/1     Running   0          64m

NAME                                          TYPE           CLUSTER-IP       EXTERNAL-IP                                                                      PORT(S)                      AGE
service/auth-demo                             NodePort       10.100.133.171   &lt;none&gt;                                                                           8080:32330/TCP               43h
service/kubernetes                            ClusterIP      10.100.0.1       &lt;none&gt;                                                                       443/TCP                      6d
service/mysql                                 ClusterIP      10.100.132.124   &lt;none&gt;                                                                       3306/TCP                     4d
service/ngnix-nginx-ingress-controller        LoadBalancer   10.100.187.138   ad7e991b46f3e11ea82750210ef3e95f-&lt;ommited&gt;.&lt;ommited&gt;.elb.amazonaws.com   80:32282/TCP,443:30047/TCP   64m
service/ngnix-nginx-ingress-default-backend   ClusterIP      10.100.89.32     &lt;none&gt;                                                                       80/TCP                       64m

NAME                                                  READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/auth-demo                             1/1     1            1           43h
deployment.apps/mysql                                 1/1     1            1           4d
deployment.apps/ngnix-nginx-ingress-controller        1/1     1            1           64m
deployment.apps/ngnix-nginx-ingress-default-backend   1/1     1            1           64m

NAME                                                             DESIRED   CURRENT   READY   AGE
replicaset.apps/auth-demo-6dfb9b5d78                             1         1         1       43h
replicaset.apps/mysql-79945f6847                                 1         1         1       4d
replicaset.apps/ngnix-nginx-ingress-controller-54988f47d7        1         1         1       64m
replicaset.apps/ngnix-nginx-ingress-default-backend-77457bd5ff   1         1         1       
</code></pre>

<p>64m</p>

<p>This is my super simple YAML:</p>

<pre><code>apiVersion: networking.k8s.io/v1beta1
  kind: Ingress
  metadata:
    annotations:
      kubernetes.io/ingress.class: nginx
    name: &lt;ommited&gt;
    namespace: default
  spec:
    rules:
        http:
          paths:
            - backend:
                serviceName: auth-demo
                servicePort: 8080
              path: /
</code></pre>

<p>I get: <code>error: error parsing deployment.yaml: error converting YAML to JSON: yaml: line 2: mapping values are not allowed in this context</code> on <code>kubectl apply -f deployment.yaml</code>.</p>

<p>Does any know of a way to diagnose? Thanks!</p>

Simeon
<p>There is indentation issue in the yaml and below should work.</p>

<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: test-ingress
  annotations:
    kubernetes.io/ingress.class: nginx
  namespace: default
spec:
  rules:
  - http:
      paths:
      - path: /
        backend:
          serviceName: auth-demo
          servicePort: 8080
</code></pre>
