how to make server can be be reachable from kube-apiserver by container IP address

5/25/2021

I am deploying Metrics Server https://github.com/kubernetes-sigs/metrics-server and notice there is one Requirements in README: Metrics Server must be reachable from kube-apiserver by container IP address (or node IP if hostNetwork is enabled). Wonder how to make it except deploying cni in kube-apiserver host or setting container network to hostNetwork?

-- wartih
kubernetes

1 Answer

5/25/2021

You do it by doing it, there's no specific answer. If you run kube-apiserver within the cluster (e.g. as a static pod) then this is probably already the case. Otherwise you have to arrange for this to work in whatever networking layout you have.

-- coderanger
Source: StackOverflow