Run cAdvisor on the same interface as kubelet

cAdvisor currently binds to all interfaces. Currently the only
solution is to use iptables to block access to the port. We
are better off making cAdvisor to bind to the interface that
kubelet uses for better security.

Fixes #11710
This commit is contained in:
Davanum Srinivas
2017-06-08 15:56:59 -04:00
parent 038d194723
commit 7e5c43a042
5 changed files with 10 additions and 8 deletions

View File

@@ -99,7 +99,7 @@ func containerRuntime() error {
}
// Setup cadvisor to check the container environment
c, err := cadvisor.New(0 /*don't start the http server*/, "docker", "/var/lib/kubelet")
c, err := cadvisor.New("", 0 /*don't start the http server*/, "docker", "/var/lib/kubelet")
if err != nil {
return printError("Container Runtime Check: %s Could not start cadvisor %v", failed, err)
}