Commit be3c2191 authored by Eric Paris's avatar Eric Paris

update example systemd files to be more obvious

only set the etcd servers in the apiserver config set the --master= in the global config still need --api_servers= different in kubelet because, ummmm, we do comment out the apiserver config in controller and scheduler, not needed point the proxy to api, not to etcd
parent db4d8d96
...@@ -31,4 +31,4 @@ It may seem reasonable to use --option=${OPTION} in the .service file instead of ...@@ -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. 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".
...@@ -8,13 +8,13 @@ ...@@ -8,13 +8,13 @@
KUBE_API_ADDRESS="--address=127.0.0.1" KUBE_API_ADDRESS="--address=127.0.0.1"
# The port on the local server to listen on. # The port on the local server to listen on.
KUBE_API_PORT="--port=8080" # KUBE_API_PORT="--port=8080"
# How the replication controller and scheduler find the kube-apiserver
KUBE_MASTER="--master=127.0.0.1:8080"
# Port minions listen on # 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 # Address range to use for services
KUBE_SERVICE_ADDRESSES="--portal_net=10.254.0.0/16" KUBE_SERVICE_ADDRESSES="--portal_net=10.254.0.0/16"
......
...@@ -9,10 +9,6 @@ ...@@ -9,10 +9,6 @@
# kube-scheduler.service # kube-scheduler.service
# kubelet.service # kubelet.service
# kube-proxy.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 # logging to stderr means we get it in the systemd journal
KUBE_LOGTOSTDERR="--logtostderr=true" KUBE_LOGTOSTDERR="--logtostderr=true"
...@@ -21,3 +17,6 @@ KUBE_LOG_LEVEL="--v=0" ...@@ -21,3 +17,6 @@ KUBE_LOG_LEVEL="--v=0"
# Should this cluster be allowed to run privileged docker containers # Should this cluster be allowed to run privileged docker containers
KUBE_ALLOW_PRIV="--allow_privileged=false" 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"
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
KUBELET_ADDRESS="--address=127.0.0.1" KUBELET_ADDRESS="--address=127.0.0.1"
# The port for the info server to serve on # 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 # You may leave this blank to use the actual hostname
KUBELET_HOSTNAME="--hostname_override=127.0.0.1" KUBELET_HOSTNAME="--hostname_override=127.0.0.1"
......
...@@ -4,7 +4,6 @@ Documentation=https://github.com/GoogleCloudPlatform/kubernetes ...@@ -4,7 +4,6 @@ Documentation=https://github.com/GoogleCloudPlatform/kubernetes
[Service] [Service]
EnvironmentFile=-/etc/kubernetes/config EnvironmentFile=-/etc/kubernetes/config
EnvironmentFile=-/etc/kubernetes/apiserver
EnvironmentFile=-/etc/kubernetes/controller-manager EnvironmentFile=-/etc/kubernetes/controller-manager
User=kube User=kube
ExecStart=/usr/bin/kube-controller-manager \ ExecStart=/usr/bin/kube-controller-manager \
......
...@@ -9,7 +9,7 @@ EnvironmentFile=-/etc/kubernetes/proxy ...@@ -9,7 +9,7 @@ EnvironmentFile=-/etc/kubernetes/proxy
ExecStart=/usr/bin/kube-proxy \ ExecStart=/usr/bin/kube-proxy \
$KUBE_LOGTOSTDERR \ $KUBE_LOGTOSTDERR \
$KUBE_LOG_LEVEL \ $KUBE_LOG_LEVEL \
$KUBE_ETCD_SERVERS \ $KUBE_MASTER \
$KUBE_PROXY_ARGS $KUBE_PROXY_ARGS
Restart=on-failure Restart=on-failure
LimitNOFILE=65536 LimitNOFILE=65536
......
...@@ -4,7 +4,6 @@ Documentation=https://github.com/GoogleCloudPlatform/kubernetes ...@@ -4,7 +4,6 @@ Documentation=https://github.com/GoogleCloudPlatform/kubernetes
[Service] [Service]
EnvironmentFile=-/etc/kubernetes/config EnvironmentFile=-/etc/kubernetes/config
EnvironmentFile=-/etc/kubernetes/apiserver
EnvironmentFile=-/etc/kubernetes/scheduler EnvironmentFile=-/etc/kubernetes/scheduler
User=kube User=kube
ExecStart=/usr/bin/kube-scheduler \ ExecStart=/usr/bin/kube-scheduler \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment