kwt icon indicating copy to clipboard operation
kwt copied to clipboard

[dns] resolve service using internal (short) name?

Open austinnichols101 opened this issue 5 years ago • 6 comments

Given a svc with the following FQDN:

foo.default.svc.cluster.local

is there a configuration option that will allow me to resolve using the "short" name:

foo.default

austinnichols101 avatar Nov 15 '18 15:11 austinnichols101

@austinnichols101 not currently. any concerns over conflicting with public domains (eg app.dev could be a legitimate site)?

can try adding as as an optional feature though, lmk.

Sent from my iPhone

On Nov 15, 2018, at 7:57 AM, M [email protected] wrote:

Given a svc with the following FQDN:

foo.default.svc.cluster.local

is there a configuration option that will allow me to resolve using the "short" name:

foo.default

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

cppforlife avatar Nov 15 '18 16:11 cppforlife

I can work around it by specifying a dns search domain on the local host. A name conflict with a public domain is possible, but is typically the exception and not the rule.

As background, I have been using telepresence with vpn-tcp mode which allows this type of lookup. This allows me to use the same naming that the pods use within the cluster.

austinnichols101 avatar Nov 15 '18 17:11 austinnichols101

@austinnichols101 do you typically configure it to deal with shortest names as well (just the svc name, eg foo)?

cppforlife avatar Nov 15 '18 18:11 cppforlife

@cppforlife no, typically I use the svc name + namespace.

austinnichols101 avatar Nov 15 '18 20:11 austinnichols101

all righty, i ll give it a try next week.

cppforlife avatar Nov 15 '18 21:11 cppforlife

@austinnichols101 you can also setup bespoke routes via VirtualService resource https://starkandwayne.com/blog/adding-a-custom-domain-for-knative-services/

drnic avatar Nov 16 '18 00:11 drnic