<p>Can we have a single ingress resource for deployment of all mulesoft applications in RTF in Self Managed Kubernetes on AWS?</p>
<p>Ingress template:</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: rtf-ingress
  namespace: rtf 
  annotations:
     nginx.ingress.kubernetes.io/configuration-snippet: |
      rewrite ^/app-name(/|$)(.*) /$2 break;
     nginx.ingress.kubernetes.io/rewrite-target: /$2
     nginx.ingress.kubernetes.io/ssl-redirect: &quot;false&quot;
     nginx.ingress.kubernetes.io/enable-underscores-in-headers: &quot;true&quot;
     nginx.ingress.kubernetes.io/use-regex: &quot;true&quot;
spec:
  ingressClassName: rtf-nginx 
   
  rules:
  - host: example.com
    http:
      paths: 
      - pathType: Prefix
        path: /
        backend: 
          service:
           name: temp1-svc
           port:
             number: 80
       - pathType: Prefix
         path: /
         backend: 
         service:
           name: temp2-svc
           port:
             number: 80
</code></pre>
<p>temp1-svc:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: temp1-svc
spec:
  ports:
  - port: 80
    targetPort: 80
    protocol: TCP
    name: http
  selector:
    app: temp1-svc
</code></pre>
<p>temp2-svc:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: temp2-svc
spec:
  ports:
  - port: 80
    targetPort: 80
    protocol: TCP
    name: http
  selector:
    app: temp2-svc
</code></pre>
<p>I am new to RTF, any changes to be done in Ingress resource or do we need to have separate ingress resource for each application? Any help would be appreciated.
Thanks</p>

anonymous
<p>Generally managing different, <strong>ingress</strong> if good option.</p>
<p>You can also use the <strong>single ingress</strong> routing and forwarding traffic across the cluster.</p>
<p><strong>Single ingress for all services</strong></p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: rtf-ingress
  namespace: rtf 
  annotations:
     nginx.ingress.kubernetes.io/configuration-snippet: |
      rewrite ^/app-name(/|$)(.*) /$2 break;
     nginx.ingress.kubernetes.io/rewrite-target: /$2
     nginx.ingress.kubernetes.io/ssl-redirect: &quot;false&quot;
     nginx.ingress.kubernetes.io/enable-underscores-in-headers: &quot;true&quot;
     nginx.ingress.kubernetes.io/use-regex: &quot;true&quot;
spec:
  ingressClassName: rtf-nginx 
   
  rules:
  - host: example.com
    http:
      paths: 
      - pathType: ImplementationSpecific
        path: /(.*)
        backend: 
          service:
            name: service
            port:
              number: 80
      - pathType: ImplementationSpecific
        path: /(.*)
        backend: 
          service:
            name: service-2
            port:
              number: 80
</code></pre>
<p>the benefit of multiple ingress resources or separate ingress is that you can keep and configure the different <strong>annotations</strong> to your ingress.</p>
<p>In one, you want to enable <strong>CORS</strong> while in another you want to change proxy body head etc. So it's better to manage ingress for each microservice.</p>
