Skip to content

Add health check using TCP #28737

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

Closed
wants to merge 1 commit into from

Conversation

shamsher31
Copy link
Member

@shamsher31 shamsher31 commented Nov 10, 2020

Based on istio/istio.io#8246 (comment)

Follow up for istio/istio.io#8246

$ kubectl get pods
NAME                             READY   STATUS    RESTARTS   AGE
liveness-http-86c7cc8f45-s4h7m   1/1     Running   0          1m
liveness-tcp-59f6d56f7-69f7k     1/1     Running   0          2m

Using the HTTP probe

$ kubectl describe pod liveness-http-86c7cc8f45-s4h7m
...
Liveness:       http-get http://:8001/foo delay=5s timeout=1s period=5s #success=1 #failure=3

Using TCP probe

$ kubectl describe pod liveness-tcp-59f6d56f7-69f7k
...
Liveness:       tcp-socket :8001 delay=5s timeout=1s period=5s #success=1 #failure=3

@shamsher31 shamsher31 added area/user experience release-notes-none Indicates a PR that does not require release notes. labels Nov 10, 2020
@shamsher31 shamsher31 added this to the 1.8 milestone Nov 10, 2020
@shamsher31 shamsher31 requested a review from a team as a code owner November 10, 2020 05:55
@shamsher31 shamsher31 self-assigned this Nov 10, 2020
@google-cla google-cla bot added the cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. label Nov 10, 2020
@istio-testing istio-testing added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 10, 2020
@shamsher31 shamsher31 requested review from ericvn and frankbu November 10, 2020 14:14
@gofman8
Copy link

gofman8 commented Nov 20, 2020

TCP health checks does not work at all. Check #15178
the documentation and examples are wrong

Copy link
Member

@howardjohn howardjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure this is right. AFAIK TCP socket health check is broken by design in Istio, since its not possible to proxy a "can I connect" check.

- containerPort: 8001
livenessProbe:
tcpSocket:
port: 8001
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can set this to literally any port and it will pass if the sidecar is injected

@shamsher31
Copy link
Member Author

you can set this to literally any port and it will pass if the sidecar is injected.

Closing this as it's not the correct solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/user experience cla: yes Set by the Google CLA bot to indicate the author of a PR has signed the Google CLA. release-notes-none Indicates a PR that does not require release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants