Set oom_score_adj for kubelet and kube-proxy to a low value to help them survive system memory pressure.

This commit is contained in:
Vishnu Kannan
2014-12-24 00:03:26 +00:00
parent 8824e46340
commit 6f53f33fda
3 changed files with 25 additions and 0 deletions

View File

@@ -61,6 +61,7 @@ var (
maxContainerCount = flag.Int("maximum_dead_containers_per_container", 5, "Maximum number of old instances of a container to retain per container. Each container takes up some disk space. Default: 5.")
authPath = flag.String("auth_path", "", "Path to .kubernetes_auth file, specifying how to authenticate to API server.")
cAdvisorPort = flag.Uint("cadvisor_port", 4194, "The port of the localhost cAdvisor endpoint")
oomScoreAdj = flag.Int("oom_score_adj", -900, "The oom_score_adj value for kubelet process. Values must be within the range [-1000, 1000]")
apiServerList util.StringList
)
@@ -92,6 +93,10 @@ func main() {
setupRunOnce()
if err := util.ApplyOomScoreAdj(*oomScoreAdj); err != nil {
glog.Info(err)
}
kcfg := standalone.KubeletConfig{
Address: address,
AuthPath: *authPath,