Closed rophy closed 1 month ago
I noticed it is probing 127.0.0.1
, which looks wrong. It is supposed to be aware that it's running inside container, and probe the IP address of ccm.
/kind bug /kind documentation
It seems that we forget about this installation mode when we migrated to envoy as the loadbalancer and added the healthchecks to improve reliability, thanks for reporting, the healtcheck indeed uses the localhost because the envoy admin port is. forwarded, so cloud-provider-kind need to run on the host network
Can you try docker run --rm ---network host -v /var/run/docker.sock:/var/run/docker.sock cloud-provider-kind
?
That should make it
Running in host mode works fine, thanks.
What are the considerations for choosing the network mode? I imagine there are some assumptions for host mode to work, e.g. the target kind container must have exposed a host port for cloud-provider-kind to reach.
The need to support multiple platforms like windows, Mac or WSL or other containerized combos breaks the assumption the cloud-provider-kind can reach the container, so we rely on the docker portmap API to forward those ports to localhost to support all platform ... 🤷
/help
PR are welcome to fix the docs to use host network when running inside a container
Env Info
Steps to reproduce
kind create cluster
docker run --rm --network kind -v /var/run/docker.sock:/var/run/docker.sock cloud-provider-kind
Expected Result
cloud-provider-kind should be able to:
Actual Result
cloud-provider-kind can do step 1, 2, and fails on step 3