title: Getting an error I don't understand with k8s
body: <p>My yaml file.</p>
  <pre><code>apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    name: ingress-service
    annotations:
      kubernetes.io/ingress.class: nginx
      nginx.ingress.kubernetes.io/rewrite-target: /$1
  spec:
    rules:
      -http:
        paths:
          - path: /?(.*)
            backend:
              serviceName: nginx-service
              servicePort: 80
  </code></pre>
  <pre><code>kubectl apply -f file.yaml
  
  error: error validating &quot;ingress.yaml&quot;: error validating data: ValidationError(Ingress.spec.rules): invalid type for io.k8s.api.networking.v1beta1.IngressSpec.rules: got &quot;map&quot;, expected &quot;array&quot;; if you choose to ignore these errors, turn validation off with --validate=false
  </code></pre>