I have issues trying to redirect the traffic to an external service using the type as ExternalName and with the ingress controller.
I get the following error and i can access this host from the host machine but not from K8S. Alsothe IP 10.96.0.10 is tied to the kube-dns service.
Error resolving host "internaldnsname.com": lookup internaldnsname.com on 10.96.0.10:53: no such host
What am i missing?
Ingress rule
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: external-ingress
annotations:
kubernetes.io/ingress.class: “nginx”
nginx.ingress.kubernetes.io/ingress.class: “nginx”
nginx.ingress.kubernetes.io/preserve-host: “false”
spec:
rules:
- host:
http:
paths:
- backend:
serviceName: external-service
servicePort: 80
path: /
Service definition
apiVersion: v1
kind: Service
metadata:
name: external-service
spec:
type: ExternalName
externalName: internaldnsname.com