vcluster
vcluster copied to clipboard
Support node ports on fake kubelet endpoints
Currently vcluster will exchange the node ip to redirect to traffic to itself (to rewrite cluster metrics). One problem with this is that those fake ips do not forward traffic in created node ports.
In order to implement this, we would need a controller that reconciles all virtual cluster node services and opens a new port on the vcluster that redirects traffic to the actual node ip.
I am not sure about the implications, but wouldn't it work to have the real node IPs in the fake node ip field or even the external-ip field? I tested a LoadBalancer service inside a vcluster and using the real node ip instead of the ip from a fake node worked.
Is there any option to set the external-ip of the virtual nodes to the internal ip of the real nodes?
@everflux There is no such option at the moment. But when you use "Real nodes" node syncing mode, the ExternalIP address of the host node should be visible in the .status.addresses field of the virtual node.
If someone else wonders how to configure the ExternalIP of bare metal nodes, see https://github.com/kubernetes/kubernetes/issues/42125