<p>I am using <strong>AKS</strong>(Azure Kubernetes Service) <strong>to spin up</strong> all the Hyperledger <strong>Fabric containers</strong>. A sample Fabric network is running successfully on AKS. But, as by default <strong><em>all the containers/pods are accessible just within the cluster.</em></strong></p>

<p><strong>How do I use ingress to expose the pods/fabric containers to be accessible with external IPs?</strong></p>

<p>I looked at some references but they use ingress-controller to define routes for navigating the request to a specific pod.</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: hello-world-ingress
  namespace: ingress-basic
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/ssl-redirect: "false"
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - http:
      paths:
      - path: /
        backend:
          serviceName: aks-helloworld
          servicePort: 80
      - path: /hello-world-two
        backend:
          serviceName: ingress-demo
          servicePort: 80
</code></pre>

<p>Whereas, we can't have any specific rules/path for peers/orderer containers.</p>

<p>Would be great if someone can point me towards the required configuration for it.</p>

<p>First of all, Ingress define routes to <strong>services</strong> and not pods. If you have a LoadBalancer service for your Ingress-controller you should be able to expose your apps. <a href="https://github.com/nginxinc/kubernetes-ingress/blob/master/docs/installation.md" rel="nofollow noreferrer">Here</a> are the installation instrutions.  </p>

<p>P.S. You don't necessarily need a reverse proxy to expose your services externally. You can do it with <a href="https://kubernetes.io/docs/concepts/services-networking/service/#nodeport" rel="nofollow noreferrer">NodePort</a> services.</p>

<p>P.S.2 If you need more complex rules and requirements for routing, I strongly recommend checking out <a href="https://www.getambassador.io/" rel="nofollow noreferrer">Ambassador</a>.</p>
