Reputation: 31
I have many services deployed in K8s, some of the services are exposed externally using Ingress controller and DNS is registered in AWS Route 53. There are some internal services which are to be used strictly internally. what are the ways to access internal services in K8s? FYI..I have core dns enable and service to service communication should happen via ingress controller nginx.conf file.
Regards
Upvotes: 3
Views: 351
Reputation: 8840
That depends on what you mean by internal services which are to be used strictly internally.
If the question is about services exposed inside the cluster then you can use services with a ClusterIP
type
As mentioned in documentation:
ClusterIP: Exposes the Service on a cluster-internal IP. Choosing this value makes the Service only reachable from within the cluster.
If the question is about services exposed outside the cluster then I would recommend to use the whitelist-source-range
annotation.
Please refer to the following documentation to get more information about that. There is also an example.
Upvotes: 1