-
Notifications
You must be signed in to change notification settings - Fork 38.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Headless service targetPort not resolving containerPort name #20488
Comments
The concept of "port" being different from "targetPort" doesn't apply to headless services. The port translation is happening as part of the layer-4 load-balancing, but headless really means "no load-balancer". Think of it from a traffic flow point of view. With a plain service, I can map port X to port Y. A client access the VIP on port X. The LB logic rewrites that to backend:Y. With a headless service, a client accesses backend:Y directly. That is why we require X and Y to be the same in headless services. |
@thockin I'm probably missing something here, but it looks to me like X and Y are both 9300 here. Does it make any difference that it's being referred to by name? |
The resolution of name to number happens much later than API validation (in On Tue, Feb 2, 2016 at 8:58 AM, Luke Meyer notifications@github.com wrote:
|
Thanks for clarification. |
It seems that my headless service definition does not correctly resolve the containerPort name.
I receive this error when I
oc process <template> | oc create -f -
My service is defined as:
And my container is defined with:
This was run using kubernetes v1.2.0-alpha.4-851-g4a65fa1
The text was updated successfully, but these errors were encountered: