Hello,
I have two services in my kubernetes cluster (based on microk8s)
reachable on:
search.example.com and
api.example.com
Now it is the case that the access from the api.example.com pod to search.example.com pod throws an error - the error comes from niginx
The service pods all run on http and 80 and TCP.
How can I solve the problem with a clean port forwarding via ingress controller?
See my example configuration:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: behuf-ingress
namespace: behuf-example
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: "600m"
nginx.org/client-max-body-size: "600m"
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
tls:
- hosts:
- api.example.com
- search.example.com
secretName: tls-secret
rules:
- host: api.example.com
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: example-erp-service
port:
number: 80
- host: search.example.com
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: example-search-service
port:
number: 80