diff --git a/contrib/init/systemd/README.md b/contrib/init/systemd/README.md index 5554ad20bbf..266d719c54a 100644 --- a/contrib/init/systemd/README.md +++ b/contrib/init/systemd/README.md @@ -31,4 +31,4 @@ It may seem reasonable to use --option=${OPTION} in the .service file instead of While some command line options to the daemons use the default when passed an empty option some cause the daemon to fail to launch. --allow_privileged= (without a value of true/false) will cause the kube-apiserver and kubelet to refuse to launch. -It also may seem reasonable to just use ${DAEMON_ARGS} and string all of these into one line in the environment file. While that makes the .service file simple it makes the admin job more difficult to locate and make appropriate changes to the config. This is a tradeoff between having to update the .service file to add new options or having the config files easy for an admin to work with. I choose: "easy for adminmost of the time". +It also may seem reasonable to just use $DAEMON_ARGS and string all of these into one line in the environment file. While that makes the .service file simple it makes the admin job more difficult to locate and make appropriate changes to the config. This is a tradeoff between having to update the .service file to add new options or having the config files easy for an admin to work with. I choose: "easy for admin most of the time". diff --git a/contrib/init/systemd/environ/apiserver b/contrib/init/systemd/environ/apiserver index 0564cfcbd28..2972ac8be6a 100644 --- a/contrib/init/systemd/environ/apiserver +++ b/contrib/init/systemd/environ/apiserver @@ -8,13 +8,13 @@ KUBE_API_ADDRESS="--address=127.0.0.1" # The port on the local server to listen on. -KUBE_API_PORT="--port=8080" - -# How the replication controller and scheduler find the kube-apiserver -KUBE_MASTER="--master=127.0.0.1:8080" +# KUBE_API_PORT="--port=8080" # Port minions listen on -KUBELET_PORT="--kubelet_port=10250" +# KUBELET_PORT="--kubelet_port=10250" + +# Comma separated list of nodes in the etcd cluster +KUBE_ETCD_SERVERS="--etcd_servers=http://127.0.0.1:4001" # Address range to use for services KUBE_SERVICE_ADDRESSES="--portal_net=10.254.0.0/16" diff --git a/contrib/init/systemd/environ/config b/contrib/init/systemd/environ/config index 39959d83259..b90a756a531 100644 --- a/contrib/init/systemd/environ/config +++ b/contrib/init/systemd/environ/config @@ -9,10 +9,6 @@ # kube-scheduler.service # kubelet.service # kube-proxy.service - -# Comma separated list of nodes in the etcd cluster -KUBE_ETCD_SERVERS="--etcd_servers=http://127.0.0.1:4001" - # logging to stderr means we get it in the systemd journal KUBE_LOGTOSTDERR="--logtostderr=true" @@ -21,3 +17,6 @@ KUBE_LOG_LEVEL="--v=0" # Should this cluster be allowed to run privileged docker containers KUBE_ALLOW_PRIV="--allow_privileged=false" + +# How the controller-manager, scheduler, and proxy find the apiserver +KUBE_MASTER="--master=http://127.0.0.1:8080" diff --git a/contrib/init/systemd/environ/kubelet b/contrib/init/systemd/environ/kubelet index 0c0d217fd91..64a7b25c454 100644 --- a/contrib/init/systemd/environ/kubelet +++ b/contrib/init/systemd/environ/kubelet @@ -5,7 +5,7 @@ KUBELET_ADDRESS="--address=127.0.0.1" # The port for the info server to serve on -KUBELET_PORT="--port=10250" +# KUBELET_PORT="--port=10250" # You may leave this blank to use the actual hostname KUBELET_HOSTNAME="--hostname_override=127.0.0.1" diff --git a/contrib/init/systemd/kube-controller-manager.service b/contrib/init/systemd/kube-controller-manager.service index 422b4677cd6..3c135154095 100644 --- a/contrib/init/systemd/kube-controller-manager.service +++ b/contrib/init/systemd/kube-controller-manager.service @@ -4,7 +4,6 @@ Documentation=https://github.com/GoogleCloudPlatform/kubernetes [Service] EnvironmentFile=-/etc/kubernetes/config -EnvironmentFile=-/etc/kubernetes/apiserver EnvironmentFile=-/etc/kubernetes/controller-manager User=kube ExecStart=/usr/bin/kube-controller-manager \ diff --git a/contrib/init/systemd/kube-proxy.service b/contrib/init/systemd/kube-proxy.service index 7b95755d53e..9e065a309fb 100644 --- a/contrib/init/systemd/kube-proxy.service +++ b/contrib/init/systemd/kube-proxy.service @@ -9,7 +9,7 @@ EnvironmentFile=-/etc/kubernetes/proxy ExecStart=/usr/bin/kube-proxy \ $KUBE_LOGTOSTDERR \ $KUBE_LOG_LEVEL \ - $KUBE_ETCD_SERVERS \ + $KUBE_MASTER \ $KUBE_PROXY_ARGS Restart=on-failure LimitNOFILE=65536 diff --git a/contrib/init/systemd/kube-scheduler.service b/contrib/init/systemd/kube-scheduler.service index a726407945b..6b9453e0210 100644 --- a/contrib/init/systemd/kube-scheduler.service +++ b/contrib/init/systemd/kube-scheduler.service @@ -4,7 +4,6 @@ Documentation=https://github.com/GoogleCloudPlatform/kubernetes [Service] EnvironmentFile=-/etc/kubernetes/config -EnvironmentFile=-/etc/kubernetes/apiserver EnvironmentFile=-/etc/kubernetes/scheduler User=kube ExecStart=/usr/bin/kube-scheduler \