-
Notifications
You must be signed in to change notification settings - Fork 162
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
bug: kubelet server certificates does not include keepalived VIP #158
Comments
Hi moray95, Can you set this variable and try again?
|
@kubilaykaptanoglu I have tried this but sadly it does not work. The 10.64.0.9 is already present in |
I couldn't reproduce this problem. Especially I tried with your configuration. |
Out of curiosity, does Kubernetes show the VIP as the node internal address? |
Thanks for the info. I guess here is the problem:
On my setup, I see the VIP as the node internal address. When VIP isn't used, certificates shouldn't cause a problem as the non-virtual ip are is properly added to the certificate. |
Can you share your hosts(inventory) file with me? |
Sure, here it is:
|
If possible can you do a clean installation? Before installation you should run these commands on all servers; /usr/local/bin/rke2-uninstall.sh my example config:
|
So, I performed a clean install on a brand new VM and here is my finding: Using 10.34.10.2 as VIP and 10.34.10.3 as node ip, the same issue still appears. Using 10.34.10.2 as node ip and 10.34.10.3 as VIP, the issue disappears. On the initial setup, I changed the VIP from 10.64.0.9 to 10.64.0.19 and the issue got fixed. My guess would be that RKE uses the lowest IP when multiple IPs are available, but your example seems to contradict this. Maybe it's an OS difference? I am using Ubuntu Server 22.04 for the record. |
I used Ubuntu 20.04. I will try next week with Ubuntu 22.04 and I will write result here. |
Summary
When using HA setup with Keeplived, the server certificates provisioned for Kubelet does not include the Keepalived VIP. This causes TLS verification issues when performing various operations like viewing logs or port forwarding on the current leader.
Issue Type
Bug Report
Ansible Version
Steps to Reproduce
Expected Results
The TLS certificate generated for Kubelet includes the Keepalived VIP (10.64.0.9 in the example above), issuing
kubectl logs
andkubectl port-forward
command on pods on the current leader works without problem.Actual Results
The TLS certificate for Kubelet does not include the Keepalived VIP (10.64.0.9 in the example above). Issuing
kubectl logs
orkubectl port-forward
commands on pods on the current leader results in the following error:Error from server: Get "https://10.64.0.9:10250/containerLogs/kube-system/kube-proxy-master-0/kube-proxy": tls: failed to verify certificate: x509: certificate is valid for 127.0.0.1, 10.64.0.10, not 10.64.0.9
Additional information:
node-ip
andadvertise-address
to the non-virtual ip but to no avail.The text was updated successfully, but these errors were encountered: