-
Notifications
You must be signed in to change notification settings - Fork 50
Let CCM reach API server through k8s svc to avoid bad TLS cert #226
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
Let CCM reach API server through k8s svc to avoid bad TLS cert #226
Conversation
Currently, our example CCM uses the host IP address for the Kubernetes service host. This is problematic for cases where the original master node disappears (through, say, an initial upscale and subsequent downscale of the control plane) since the certificate won't be valid for that IP address anymore. Example output showing the problem: E1215 23:06:20.726439 1 leaderelection.go:330] error retrieving resource lock kube-system/cloud-controller-manager: Get https://10.116.0.44:6443/api/v1/namespaces/kube-system/endpoints/cloud-controller-manager: x509: certificate is valid for 10.96.0.1, 67.205.137.20, 138.197.227.228, not 10.116.0.44 The solution is to not overwrite the Kubernetes service host environment variable and let CCM use the `kubernetes` service normally. This is guaranteed to work because API servers advertise their own IP address on startup, which then becomes part of the continuously reconciled `kubernetes` service's endpoint set.
Hi @timoreimann. 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 Once the patch is verified, the new status will be reflected by the 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. |
/assign @prksu |
/ok-to-test |
/test pull-cluster-api-provider-digitalocean-e2e |
/test all |
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.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cpanato, timoreimann 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 |
What this PR does / why we need it:
Currently, our example CCM uses the host IP address for the Kubernetes service host. This is problematic for cases where the original master node disappears (through, say, an initial upscale and subsequent downscale of the control plane) since the certificate won't be valid for that IP address anymore. Example output showing the problem:
The solution is to not overwrite the Kubernetes service host environment variable and let CCM use the
kubernetes
service normally. This is guaranteed to work because API servers advertise their own IP address on startup, which then becomes part of the continuously reconciledkubernetes
service's endpoint set.Release note: