Let's say I'm using an GCE ingress
to handle traffic from outside the cluster and terminate TLS (https://example.com/api/items
), from here the request gets routed to one of two services
that are only available inside the cluster. So far so good.
What if I have to call service B from service A, should I go all the way and use the cluster's external IP/domain and use HTTPS (https://example.com/api/user/1
) to call the service or could I use the internal IP of the service and use HTTP (http://serviceb/api/user/1
)? Do I have to encrypt the data or is it "safe" as long as it isn't leaving the private k8s network?
What if I want to have "internal" endpoints that should only be accessible from within the cluster - when I'm always using the external https-url those endpoints would be reachable for everyone. Calling the service directly, I could just do a http://serviceb/internal/info/abc
.