<p>I'd like to expose some web services to be accessed from an external client in Kubernetes, many people recommended to use ingress. I've deployed an ingress controller following the guide: <a href="https://github.com/kubernetes/ingress-nginx/blob/master/docs/deploy/index.md" rel="nofollow noreferrer">https://github.com/kubernetes/ingress-nginx/blob/master/docs/deploy/index.md</a>. </p>

<p>I don't understand what's the next step to do, could anyone help explain the step with an example?</p>

zulv
<p>You need to create an Ingress resource and Service tied to that Ingress. For example for nginx ingress controller:</p>

<pre><code>cat &lt;&lt;EOF
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/rewrite-target: /
  name: foo-boo
  namespace: default
spec:
  rules:
  - host: foo.domain
    http:
      paths:
      - backend:
          serviceName: http-svc
          servicePort: 80
        path: /mypath
EOF | kubectl apply -f -
</code></pre>

<p>Then you can will able to see the ingress:</p>

<pre><code>$ kubectl get ingress foo-boo
NAME      HOSTS         ADDRESS                PORTS   AGE
foo-boo   foo.domain    someloadbalancer.com   80      6d11h
</code></pre>

<p>Then you can test it with something like <code>curl</code>:</p>

<pre><code>$ curl -H 'Host: foo.domain' http://someloadbalancer.com/mypath
</code></pre>

<p>More about a Kubernetes Ingress <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/" rel="nofollow noreferrer">here</a>.</p>
