How can I access the api@internal
service endpoint from within the cluster as similar to accessing the other services? ie: using <service-name>.<namespace>.svc.cluster.local
I want to access it like curl -I http://<traefik-api>.mynamespace.svc.cluster.local
without defining a ingressroute as for other external traffic.
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: ingressroute-traefik
namespace: prod-xxx
annotations:
kubernetes.io/ingress.class: ingressclass-traefik
spec:
entryPoints:
- https-internal
routes:
- kind: Rule
match: "Host(`traefik.xxx.com`)"
middlewares:
- name: middleware-authentik
namespace: prod-xxx
services:
- kind: TraefikService
name: dashboard@internal
- kind: Rule
match: "Host(`traefik.xxx.com`) && PathPrefix(`/api`)"
middlewares:
- name: middleware-authentik
namespace: prod-xxx
services:
- kind: TraefikService
name: api@internal
tls:
certResolver: cloudflare
domains:
- main: "*.xxx.com"