<p>I've deployed rabbitmq cluster in k3s cluster using rabbitmq rabbitmq cluster operator. As a result, it created a ClusterIP service looks like this:</p>
<pre class="lang-yaml prettyprint-override"><code>Name:              rabbitmq
Namespace:         rabbits
Labels:            app.kubernetes.io/component=rabbitmq
                   app.kubernetes.io/name=rabbitmq
                   app.kubernetes.io/part-of=rabbitmq
Annotations:       &lt;none&gt;
Selector:          app.kubernetes.io/name=rabbitmq
Type:              ClusterIP
IP Family Policy:  SingleStack
IP Families:       IPv4
IP:                10.43.48.11
IPs:               10.43.48.11
Port:              amqp  5672/TCP
TargetPort:        5672/TCP
Endpoints:         10.42.2.55:5672,10.42.2.56:5672
Port:              management  15672/TCP
TargetPort:        15672/TCP
Endpoints:         10.42.2.55:15672,10.42.2.56:15672
Port:              mqtt  1883/TCP
TargetPort:        1883/TCP
Endpoints:         10.42.2.55:1883,10.42.2.56:1883
Port:              web-mqtt  15675/TCP
TargetPort:        15675/TCP
Endpoints:         10.42.2.55:15675,10.42.2.56:15675
Port:              stomp  61613/TCP
TargetPort:        61613/TCP
Endpoints:         10.42.2.55:61613,10.42.2.56:61613
Port:              web-stomp  15674/TCP
TargetPort:        15674/TCP
Endpoints:         10.42.2.55:15674,10.42.2.56:15674
Port:              prometheus  15692/TCP
TargetPort:        15692/TCP
Endpoints:         10.42.2.55:15692,10.42.2.56:15692
Session Affinity:  None
Events:            &lt;none&gt;
</code></pre>
<p>I want to open port 15672 for admin portal, and port 5672 for applications outside of the kubernetes cluster. I tried the following but didn't work:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: rabbitmq-admin-ingress
  annotations:
    kubernetes.io/ingress.class: &quot;traefik&quot;
spec:
  rules:
  - http:
      paths:
      - path: /
        backend:
          serviceName: rabbitmq
          servicePort: 15672
      - path : /
        backend:
          serviceName: rabbitmq
          servicePort: 5672
</code></pre>
<p>Anyone can help me, what I'm doing wrong?</p>
<p>Thanks in advance.</p>

Ahmet Cetin
<p>You can't have both paths pointing to the same location. Also, you should set a FQDN for your Ingress.</p>
<p>Try using two Ingresses, with different names - which would work in most cases:</p>
<pre><code>---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: rabbitmq-admin-ingress-one
  annotations:
    kubernetes.io/ingress.class: &quot;traefik&quot;
spec:
  rules:
  - http:
      paths:
      - path: /
        backend:
          serviceName: rabbitmq
          servicePort: 15672
    host: host1.example.com
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: rabbitmq-admin-ingress-two
  annotations:
    kubernetes.io/ingress.class: &quot;traefik&quot;
spec:
  rules:
  - http:
      paths:
      - path : /
        backend:
          serviceName: rabbitmq
          servicePort: 5672
    host: host2.example.com
</code></pre>
<p>Or use two paths on a single Ingress - may involve some additional paths rewriting:</p>
<pre><code>---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: rabbitmq-admin-ingress
  annotations:
    kubernetes.io/ingress.class: &quot;traefik&quot;
spec:
  rules:
  - http:
      paths:
      - path: /one
        backend:
          serviceName: rabbitmq
          servicePort: 15672
      - path : /two
        backend:
          serviceName: rabbitmq
          servicePort: 5672
    host: host1.example.com
</code></pre>
