As we know, kubernetes supports 2 primary modes of finding a Service - environment variables and DNS, could we disable the first way and only choose the DNS way?
As shown in this PR, this feature will land with Kubernetes v1.13. From the PR (as Docs are not available yet) I expect it to be the field enableServiceLinks
in the pod spec with true as default.
Edit: It has been a while and the PR finally landed. The enableServiceLinks
was added as an optional Boolean to the Kubernetes PodSpec.
For the record: using DNS to discover service endpoints is the recommended approach. The docker link
behavior, from where the environment variables originate, has long been deprecated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With