Skip to content
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

Readiness probe optionally not affecting receiving traffic via service #39207

Closed
hongchaodeng opened this issue Dec 23, 2016 · 3 comments
Closed

Comments

@hongchaodeng
Copy link
Contributor

hongchaodeng commented Dec 23, 2016

What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.):

Readiness probe. Service. Stateful pod.

Is this a BUG REPORT or FEATURE REQUEST? (choose one):

FEATURE REQUEST

When etcd starts, it has a bootstrap phase that talks to other peers:

Start -> bootstrapping -> running/serving

If "bootstrap" phase failed, it is the same as dead because no data is available, no quorum information is known.

However, if we start etcd in a Kubernetes Pod, even if it starts running, it doesn't mean etcd is running. it is important for the operator to know the status of the etcd member in this phase. In other words, if we starts an etcd pod, how could we tell etcd is running?

The closest way to achieve that seems to be ReadinessProbe. We can have it probing etcd to know whether it's "ready".

However, using ReadinessProbe has a problem. We reserve a service name for each etcd pod in order to form a known cluster, e.g. "m1=m1-service:2380,m2=m2-service:2380,m3=m3-service:2380", at starting etcd. If a pod isn't ready, then it couldn't receive traffic, and thus members couldn't contact each other.

A potential solution is to make Readiness decoupled from "receiving traffic". Ready is a special state between "Pod starts running" and "Pod starts serving".

@hongchaodeng
Copy link
Contributor Author

ref: #39363

@smarterclayton
Copy link
Contributor

Usually this is via two services, one with "tolerate unready endpoints" true (for member detection) and one for serving traffic.

@hongchaodeng
Copy link
Contributor Author

Closing this to merge discussion into #39363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants