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

Change health check from TCP to HTTPS #6487

Merged
merged 1 commit into from
Sep 22, 2020

Conversation

medined
Copy link
Contributor

@medined medined commented Aug 2, 2020

I kept seeing TLS handshake error from 10.250.250.158:63770: EOF from two IP addresses that correlate to my ELB. Changing the health check from TCP to HTTPS stopped the errors from being generated.

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:

This PR changes the health check of the load balancer created by the terraform scripts for AWS to be HTTPS instead of TCP. This change resolves the "TLS handshake error" messages that appears twice every 30 seconds in the apiserver logs.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Changed AWS ELB health check from TCP to HTTPS to resolve "TLS Handshake error" message in apiserver logs.

I kept seeing `TLS handshake error from 10.250.250.158:63770: EOF` from two IP addresses that correlate to my ELB. Changing the health check from TCP to HTTPS stopped the errors from being generated.
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 2, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @medined!

It looks like this is your first PR to kubernetes-sigs/kubespray 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kubespray has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 2, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @medined. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot requested review from bozzo and EppO August 2, 2020 16:30
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Aug 2, 2020
@floryut
Copy link
Member

floryut commented Aug 3, 2020

Isn't it strange that everything else target TCP and works fine ? (line 14 / 20 / 35 etc..)

@EppO
Copy link
Contributor

EppO commented Aug 3, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 3, 2020
@Miouge1
Copy link
Contributor

Miouge1 commented Aug 4, 2020

My understanding is that the health check works, but generates extra logs.

@floryut
Copy link
Member

floryut commented Aug 4, 2020

My understanding is that the health check works, but generates extra logs.

Ok in that case, why not 🤷

@Miouge1
Copy link
Contributor

Miouge1 commented Aug 4, 2020

@medined how is this working out in terms of CA? With a TCP health check there is no CA to verify, but an HTTPS health check might verify the CA (depends on the AWS implementation I suppose).

@EppO
Copy link
Contributor

EppO commented Aug 4, 2020

My understanding is that the health check works, but generates extra logs.

Indeed, TCP checks on a HTTPS endpoint will generate "TLS Handshake error" as it doesn't complete the TLS handshake, it just opens then closes a TCP connection. Depending the probe interval, it can be quite noisy in the logs (flagged as warning IIRC, not error)

@EppO
Copy link
Contributor

EppO commented Aug 6, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 6, 2020
@EppO
Copy link
Contributor

EppO commented Aug 7, 2020

@medined how is this working out in terms of CA? With a TCP health check there is no CA to verify, but an HTTPS health check might verify the CA (depends on the AWS implementation I suppose).

According to this comment, it's not an issue. Couldn't find something more official in the docs though

@medined
Copy link
Contributor Author

medined commented Aug 8, 2020

Thank you for considering this request. I am not ignoring the comments here. I just don't feel qualified to comment on larger implications of this change.

@woopstar
Copy link
Member

If you disable anon auth, the health endpoint will not respond, which could cause the LB to mark the API as down.

@EppO
Copy link
Contributor

EppO commented Sep 3, 2020

kubespray defaults are using --anonymous-auth=True so I don't think that's a problem, putting a comment in the docs may be useful though.

@woopstar
Copy link
Member

woopstar commented Sep 4, 2020

kubespray defaults are using --anonymous-auth=True so I don't think that's a problem, putting a comment in the docs may be useful though.

It's configurable by {{ kube_api_anonymous_auth }} so we should consider to switch between TCP / HTTPS mode based on this variable, maybe?

@EppO
Copy link
Contributor

EppO commented Sep 4, 2020

It's configurable by {{ kube_api_anonymous_auth }} so we should consider to switch between TCP / HTTPS mode based on this variable, maybe?

I'm not a big fan of changing settings behind user's back. If a user changes a default setting, I assume they know what they're doing. Specially that there are other ways to build the infrastructure beside the contrib folder and we will never catch that.

@Miouge1
Copy link
Contributor

Miouge1 commented Sep 18, 2020

Should we consider a flag to switch between TCP and HTTPS mode?

Considering the default value of kube_api_anonymous_auth and that this is a PR for contrib/ I'm happy to approve it as is.

@EppO
Copy link
Contributor

EppO commented Sep 18, 2020

Should we consider a flag to switch between TCP and HTTPS mode?

Considering the default value of kube_api_anonymous_auth and that this is a PR for contrib/ I'm happy to approve it as is.

agree, we can approve it as it is and create another PR to add the flag "HTTPS or TCP" with HTTPS as default

@Miouge1
Copy link
Contributor

Miouge1 commented Sep 22, 2020

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: medined, Miouge1

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 22, 2020
@k8s-ci-robot k8s-ci-robot merged commit 1805e95 into kubernetes-sigs:master Sep 22, 2020
erulabs added a commit to kubesail/kubespray that referenced this pull request Sep 23, 2020
* 'master' of https://github.com/kubernetes-sigs/kubespray:
  remove variable 'etcd_ionice', because ionice removed from container image etcd:v3.4.x (kubernetes-sigs#6735)
  calico: default to using kdd datastore (kubernetes-sigs#6693)
  Update docker packages to 19.03.13 + add docker f32 (kubernetes-sigs#6712)
  Fix snapshot.storage apiVersion (kubernetes-sigs#6711)
  properly generate extravolumes in kubeadmconfig for centos (kubernetes-sigs#6708)
  Fix reserved memory unit in kubelet configuration (kubernetes-sigs#6725)
  Fix unintended SIGPIPE (kubernetes-sigs#6721)
  Expose offline install overrides in inventory (kubernetes-sigs#6728)
  Added ability to set calico vxlan vni and port. defaults to calico's … (kubernetes-sigs#6678)
  Change health check from TCP to HTTPS (kubernetes-sigs#6487)
  Add multi architeture support to flannel (kubernetes-sigs#6166)
  Remove pypi repo and pip extra flags (kubernetes-sigs#6729)
  Fails if kubeadm_version do not matches kubernetes version (kubernetes-sigs#6302)
  Add external_openstack_lbaas_provider setting for occm (kubernetes-sigs#6566)
  add new variable allowing additionnal audit webhook server options (kubernetes-sigs#6726)
  Fix example value for etcd_quota_backend_bytes (kubernetes-sigs#6724)
  Added support for setting tiller_service_account and tiller_replicas (kubernetes-sigs#6696)
LuckySB pushed a commit to southbridgeio/kubespray that referenced this pull request Jan 16, 2021
I kept seeing `TLS handshake error from 10.250.250.158:63770: EOF` from two IP addresses that correlate to my ELB. Changing the health check from TCP to HTTPS stopped the errors from being generated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants