-
-
Notifications
You must be signed in to change notification settings - Fork 219
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
hostAliases do not work as static pod manifests in Kubernetes v1.29 #692
Comments
When manually adding the line |
this seems like a problem in the spec of kube-vip, maybe there is a workaround. |
Possible workaround: use a hand-crafted hosts file and mount it via a hostPath volume instead of relying on Regarding:
I'm not sure, I did use the very same spec in v1.28 and it did work there. I'd guess they fixed something in kubelet, so hostAliases don't work anymore (as outlined in the description) for hostNetwork pods. However I was not able to directly find an issue or pull request related to that. |
the information in the description could be completely out of date and inaccurate. @thebsdbox did the hostAliases actually work in the kube-vip manifest, it seems they were in there since epoch? |
i wasn't able to reproduce this locally with a bare kubeadm setup. @chrischdi confirmed similar with kind. so it seems like a problem in the test CAPI cluster. |
k/k ticket to understand if the docs are wrong: |
Workaround for now: instead of hostAliases:
Alternatively, other ips instead of the dns name |
hostAliases was needed and working perfectly until 1.28 start to break with 1.29, and only when cloud-provider is set to external like with CAPV in the issue or with CAPX in my case main issue seems here kubernetes/kubernetes#122420 (comment) |
Workaround for kube-vip/kube-vip#692. Moving it to the kube-vip handler so that it can be applied to other providers.
Workaround for kube-vip/kube-vip#692. Moving it to the kube-vip handler so that it can be applied to other providers.
Workaround for kube-vip/kube-vip#692. Moving it to the kube-vip handler so that it can be applied to other providers.
Workaround for kube-vip/kube-vip#692. Moving it to the kube-vip handler so that it can be applied to other providers.
Describe the bug
Created a cluster with CAPV and Kubernetes v1.29 and kube-vip as static pod
To Reproduce
erver running also as static pod (using kubeadm via Cluster API):
Expected behavior
Kube-VIP to successfully connect to the Kube-APIServer running on the same host and propagating the VIP.
Screenshots
Log lines showing kube-vip trying to resolve
kubernetes
via dns (replaced parts of the DNS IP tox.x.x
:Static pod manifest (replaced address to
x.x.x.x
):Hosts file of the pod:
Environment (please complete the following information):
Kube-vip.yaml
:If Possible add in your kube-vip manifest (please remove anything that is confidential)
Additional context
pod.spec.hostAliases
are not expected to work on hostNetwork pods:Source:
kubectl explain pod.spec.hostAliases
The text was updated successfully, but these errors were encountered: