title: Kubernetes Ingress Path only works with /
body: <p>I have configured a kubernetes ingress service but it only works when the path is /</p>
  
  <p>I have tried all manner of different values for the path including:</p>
  
  <pre><code>/*
  /servicea
  /servicea/
  /servicea/*
  </code></pre>
  
  <p>This is my ingress configuration (that works)</p>
  
  <pre><code>- apiVersion: extensions/v1beta1
    kind: Ingress
    metadata:
      name: boardingservice
      annotations:
        ingress.kubernetes.io/rewrite-target: /
    spec:
      rules:
      - host: my.url.com
        http:
          paths:
          - path: /
            backend:
              serviceName: servicea-nodeport
              servicePort: 80
  </code></pre>
  
  <p>This is my nodeport service</p>
  
  <pre><code>- apiVersion: v1
    kind: Service
    metadata:
      name: servicea-nodeport
    spec:
      type: NodePort
      ports:
      - port: 80
        targetPort: 8081
        nodePort: 30124
      selector:
        app: servicea
  </code></pre>
  
  <p>And this is my deployment</p>
  
  <pre><code>- apiVersion: extensions/v1beta1
    kind: Deployment
    metadata:
      name: servicea
    spec:
      replicas: 1
      template:
        metadata:
          name: ervicea
          labels:
            app: servicea
        spec: 
          containers:
          - image: 350329402011.dkr.ecr.eu-west-2.amazonaws.com/servicea
            name: servicea
            ports: 
            - containerPort: 8080
              protocol: TCP              
          - image: 350329402011.dkr.ecr.eu-west-2.amazonaws.com/serviceb
            name: serviceab
            ports: 
            - containerPort: 8081
              protocol: TCP  
  </code></pre>
  
  <p>If the path is / then I can do this <a href="http://my.url.com/api/ping" rel="noreferrer">http://my.url.com/api/ping</a>
  but as I will have multiple services I want to do this: <a href="http://my.url.com/servicea/api/ping" rel="noreferrer">http://my.url.com/servicea/api/ping</a> but when I set the path to /servicea I get a 404.</p>
  
  <p>I am running kubernetes on AWS with an ingress-nginx ingress controller</p>
  
  <p>Any idea?</p>