This repository has been archived by the owner on Jun 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
kube-apiserver: fix TLS handshake errors on Packet #297
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note: the documentation for that will be added as part of #295, as currently we don't have a good place to document it. |
iaguis
suggested changes
Apr 16, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some questions
...lokomotive-kubernetes/bootkube/resources/charts/kube-apiserver/templates/kube-apiserver.yaml
Show resolved
Hide resolved
...lokomotive-kubernetes/bootkube/resources/charts/kube-apiserver/templates/kube-apiserver.yaml
Show resolved
Hide resolved
...lokomotive-kubernetes/bootkube/resources/charts/kube-apiserver/templates/kube-apiserver.yaml
Show resolved
Hide resolved
invidian
force-pushed
the
invidian/fix-apiserver-tls-handshake
branch
from
April 16, 2020 12:18
5a06b73
to
2415e3b
Compare
CI is broken. |
As we always have only one backend, it doesn't make sense to perform those checks. Backend health checks in HAProxy should be used, when there is multiple backends and you want to exclude unhealthy ones from receiving traffic. In our case, we only have one backend AND we don't do any caching or custom error messages via HAProxy, so we can just always try to pass the traffic to the kube-apiserver, making HAProxy even more transparent in the setup. Perhaps in the future, we should add liveness probes for both containers, so if any of the process gets stuck, kubelet will restart it, but this is rather out of scope of this commit. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
To avoid TLS handshake errors being logged extensively on Packet. As we set --anonymous-auth=false and we don't want to change it, we need to set readiness probes to do authentication. The easiest way of doing that is via --token-auth-file with static user named nobody. The access token is generated by Helm by calculating SHA256 of secrets template, meaning the token will be different for each cluster and will be changed on any certificate change. The nobody user has no RBAC grants, so it has only access to /healthz endpoint as far as I know (I checked getting pods and /metrics too and got 401). For AWS, the TLS handshake errors cannot be resolved, as they are caused by AWS Load Balancer, which is configured to only TCP checks and in HTTP mode, it does not support authentication header, so we would have to remove --anonymous-auth=false kube-apiserver option, which we shouldn't do. Refs #278 Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
invidian
force-pushed
the
invidian/fix-apiserver-tls-handshake
branch
from
April 17, 2020 11:28
2415e3b
to
c0d3403
Compare
Oops, I think I fixed it now. |
iaguis
approved these changes
Apr 17, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
surajssd
approved these changes
Apr 21, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See commit messages for details.
Refs #278