Git Product home page Git Product logo

Comments (6)

the-redshift avatar the-redshift commented on June 21, 2024 1

Hi @aojea,
I appreciate you for taking the time to provide more context in that regard.
I can now see how changing that field would break things.

That comment you've quoted indeed states things clear as day - couldn't find that within the docs though.

Thanks again!

from kubernetes.

k8s-ci-robot avatar k8s-ci-robot commented on June 21, 2024

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

from kubernetes.

the-redshift avatar the-redshift commented on June 21, 2024

/sig network

from kubernetes.

aojea avatar aojea commented on June 21, 2024

Documentation does not state that enabling this flag will cause incoming traffic to be directed to pods that are NotReady.

https://kubernetes.io/docs/concepts/services-networking/endpoint-slices/#ready

maybe is not clear, but is the way it works

/remove-kind bug
/kind documentation

from kubernetes.

the-redshift avatar the-redshift commented on June 21, 2024

@aojea - could you elaborate why does it work the way it does? What's the benefit of routing traffic to a Pod that doesn't even has its containers up?

from kubernetes.

aojea avatar aojea commented on June 21, 2024

What's the benefit of routing traffic to a Pod that doesn't even has its containers up?

and the DNS? :)

You are focusing on the behaviors and is important to understand the internals, Services provide discovery via DNS and ClusterIP (L4 load balancers).

Services depend on the EndpointSlices, that represent the set of pods that belong to that Service and their state

These Services/EndpointSlices objects have a 1to1 relation and are used by the DNS implementation (commonly CoreDNS) and the Services implementations (commonly kube-proxy) , so both the DNS records and and proxy will do whatever the EndpointSlice says, if it says is ready then it will trust the object.

If we go to the API you have the explanation of this field

// publishNotReadyAddresses indicates that any agent which deals with endpoints for this
// Service should disregard any indications of ready/not-ready.
// The primary use case for setting this field is for a StatefulSet's Headless Service to
// propagate SRV DNS records for its Pods for the purpose of peer discovery.
// The Kubernetes controllers that generate Endpoints and EndpointSlice resources for
// Services interpret this to mean that all endpoints are considered "ready" even if the
// Pods themselves are not. Agents which consume only Kubernetes generated endpoints
// through the Endpoints or EndpointSlice resources can safely assume this behavior.
// +optional
PublishNotReadyAddresses bool

This is an opt-in feature to deal with very specific behaviors that has side effects as the one you are describing, so the user that wants to use it need to understand this (put a side we could have done differently, this is an v1 API and we need to respect it, changing behaviors at this point will be a backwards compatibility break)... in your description you describe a scenario that will fail as WAI, why any user will choose to do that?

from kubernetes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.