When looking up the host my-service.prod.svc.cluster.local, the cluster DNS Service returns a CNAME record with the value my.database.example.com. Accessing my-service works in the same way as other Services but with the crucial difference that redirection happens at the DNS level rather than via proxying or forwarding.
It means the service created in our case service.x-ns will add in the DNS a CNAME record so:
1) it's needed to refactor the createExternalService() to add a new newExternalName: example.com field
2) The test should hit the Service on the 80 port, and the response must come from example.com instead of a pod. We should not pass the nodeport in the probe.
Taking a look on externalName service, we have the following:
https://kubernetes.io/docs/concepts/services-networking/service/#externalname
It means the service created in our case service.x-ns will add in the DNS a CNAME record so: 1) it's needed to refactor the
createExternalService()
to add a newnewExternalName: example.com
field 2) The test should hit the Service on the 80 port, and the response must come from example.com instead of a pod. We should not pass the nodeport in the probe.