Accessing service’s DNS using namespace
Accessing service’s DNS using namespace
As we have seen before, when we create a service, Kubernetes will allow us to access that service with a DNS entry using the service name. So if we have a service called my-service, we can access it with something like $ curl http://my-service. These DNS entries are also scoped by namespace, so the path will be
To make it easier to see what’s happening in our example, we will use the hellok8s image we have built before, running a different version in each namespace, and then we will create the exact same service in both namespaces.