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

Initial check for container being ready in a pod #82482

Closed
alitoufighi opened this issue Sep 9, 2019 · 14 comments
Closed

Initial check for container being ready in a pod #82482

alitoufighi opened this issue Sep 9, 2019 · 14 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/autoscaling Categorizes an issue or PR as relevant to SIG Autoscaling. sig/node Categorizes an issue or PR as relevant to SIG Node.

Comments

@alitoufighi
Copy link

What would you like to be added:
I had the issue mentioned here: #37450

My applications take some time to be ready for serving traffic after creation, and I thought readinessProbe must be the solution to keep them NotReady until they're actually ready. But I only need this in the beginning of the lifecycle of my container. Using readinessProbe caused me experiencing a heavy CPU load which is not proper at all.

If there was something like initialReadinessDelay that I could say Wait for 2 minutes before bringing down old pods and replacing new ones, or using a initialReadinessProbe to check for availability of my containers, or adding some features to existing readinessProbe to set for this purpose, I would be happy experiencing a real zero downtime update.

Why is this needed:
Aside readinessProbe and livenessProbe that monitor healthiness of Pods, sometimes your containers are not such complicated. They only at their startup, need some time before they're really up and ready, and then they do their job. Then if something wrong happened, they simply crash and get restarted by their Deployment. Limiting running a readinessProbe only once prevents excess usage of resources.

Note: The readinessProbe I was using was this simple one:

readinessProbe:
  exec:
    command:
    - echo
    - '0'
  failureThreshold: 3
  initialDelaySeconds: 60
  periodSeconds: 5
  successThreshold: 1
  timeoutSeconds: 1

Because I only needed 60 seconds before Kubelet checks my container as Ready.

@alitoufighi alitoufighi added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 9, 2019
@k8s-ci-robot k8s-ci-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Sep 9, 2019
@alitoufighi
Copy link
Author

Actually I don't know if it is really related to these SIGs but @kubernetes/sig-scheduling-feature-requests @kubernetes/sig-autoscaling-feature-requests

@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/autoscaling Categorizes an issue or PR as relevant to SIG Autoscaling. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 9, 2019
@k8s-ci-robot
Copy link
Contributor

@alitoufighi: Reiterating the mentions to trigger a notification:
@kubernetes/sig-scheduling-feature-requests, @kubernetes/sig-autoscaling-feature-requests

In response to this:

Actually I don't know if it is really related to these SIGs but @kubernetes/sig-scheduling-feature-requests @kubernetes/sig-autoscaling-feature-requests

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/test-infra repository.

@ahg-g
Copy link
Member

ahg-g commented Sep 9, 2019

This is not really related to sig scheduling.

/sig node

@k8s-ci-robot k8s-ci-robot added the sig/node Categorizes an issue or PR as relevant to SIG Node. label Sep 9, 2019
@k82cn
Copy link
Member

k82cn commented Sep 10, 2019

/sig scheduling remove

@k8s-ci-robot
Copy link
Contributor

@k82cn: The label(s) sig/remove cannot be appled. These labels are supported: api-review, community/discussion, community/maintenance, community/question, cuj/build-train-deploy, cuj/multi-user, platform/aws, platform/azure, platform/gcp, platform/minikube, platform/other

In response to this:

/sig scheduling remove

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/test-infra repository.

@k82cn
Copy link
Member

k82cn commented Sep 10, 2019

/remove-sig scheduling

@k8s-ci-robot k8s-ci-robot removed the sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. label Sep 10, 2019
@ashish-oyo
Copy link

I am also looking for something like this. Any solution yet?

@alitoufighi
Copy link
Author

@ashish-oyo
Hi. I think this is the startupProbe that is implemented in 1.16.
Take a look at documentation.

As it seems to be implemented, I close this issue.

@alitoufighi
Copy link
Author

alitoufighi commented Dec 18, 2019

I'm reopening again as it seems that startupProbe is an initial probe for liveness, but in this issue we're talking about readiness, as our containers take time to be ready and we don't want to kill our previous containers during a rolling update.

@alitoufighi alitoufighi reopened this Dec 18, 2019
@matthyx
Copy link
Contributor

matthyx commented Dec 22, 2019

@alinbalutoiu actually both ReadinessProbe and LivenessProbe are disabled until StartupProbe succeeds.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 21, 2020
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Apr 20, 2020
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

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/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/autoscaling Categorizes an issue or PR as relevant to SIG Autoscaling. sig/node Categorizes an issue or PR as relevant to SIG Node.
Projects
None yet
Development

No branches or pull requests

7 participants