Skip to content

Commit

Permalink
Merge pull request kubernetes#18489 from ZJU-SEL/config-apiserver-adv…
Browse files Browse the repository at this point in the history
…ertise-addr

Auto commit by PR queue bot
  • Loading branch information
k8s-merge-robot committed Dec 10, 2015
2 parents 940f5d4 + c46957e commit 87bf85a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
15 changes: 10 additions & 5 deletions cluster/centos/master/scripts/apiserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,19 @@ KUBE_LOG_LEVEL="--v=4"
# comma separated. Mutually exclusive with -etcd-config
KUBE_ETCD_SERVERS="--etcd-servers=${ETCD_SERVERS}"
# --address=127.0.0.1: DEPRECATED: see --insecure-bind-address instead
KUBE_API_ADDRESS="--address=${MASTER_ADDRESS}"
# --insecure-bind-address=127.0.0.1: The IP address on which to serve the --insecure-port.
KUBE_API_ADDRESS="--insecure-bind-address=${MASTER_ADDRESS}"
# --port=8080: DEPRECATED: see --insecure-port instead
KUBE_API_PORT="--port=8080"
# --insecure-port=8080: The port on which to serve unsecured, unauthenticated access.
KUBE_API_PORT="--insecure-port=8080"
# --kubelet-port=10250: Kubelet port
NODE_PORT="--kubelet-port=10250"
# --advertise-address=<nil>: The IP address on which to advertise
# the apiserver to members of the cluster.
KUBE_ADVERTISE_ADDR="--advertise-address=${MASTER_ADDRESS}"
# --allow-privileged=false: If true, allow privileged containers.
KUBE_ALLOW_PRIV="--allow-privileged=false"
Expand Down Expand Up @@ -75,7 +79,8 @@ KUBE_APISERVER_OPTS=" \${KUBE_LOGTOSTDERR} \\
\${KUBE_ETCD_SERVERS} \\
\${KUBE_API_ADDRESS} \\
\${KUBE_API_PORT} \\
\${NODE_PORT} \\
\${NODE_PORT} \\
\${KUBE_ADVERTISE_ADDR} \\
\${KUBE_ALLOW_PRIV} \\
\${KUBE_SERVICE_ADDRESSES} \\
\${KUBE_ADMISSION_CONTROL} \\
Expand Down
13 changes: 7 additions & 6 deletions cluster/ubuntu/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ KUBE_APISERVER_OPTS="\
--service-cluster-ip-range=${1}\
--admission-control=${2}\
--service-node-port-range=${3}\
--advertise-address=${4}\
--client-ca-file=/srv/kubernetes/ca.crt\
--tls-cert-file=/srv/kubernetes/server.cert\
--tls-private-key-file=/srv/kubernetes/server.key"
Expand Down Expand Up @@ -232,14 +233,12 @@ EOF
function create-kubelet-opts() {
cat <<EOF > ~/kube/default/kubelet
KUBELET_OPTS="\
--address=0.0.0.0\
--port=10250 \
--hostname-override=${1} \
--api-servers=http://${2}:8080 \
--logtostderr=true \
--config=/etc/kubernetes/manifests \
--cluster-dns=$3 \
--cluster-domain=$4"
--cluster-dns=${3} \
--cluster-domain=${4}"
EOF

}
Expand Down Expand Up @@ -383,7 +382,8 @@ function provision-master() {
create-kube-apiserver-opts \
'${SERVICE_CLUSTER_IP_RANGE}' \
'${ADMISSION_CONTROL}' \
'${SERVICE_NODE_PORT_RANGE}'
'${SERVICE_NODE_PORT_RANGE}' \
'${MASTER_IP}'
create-kube-controller-manager-opts '${NODE_IPS}'
create-kube-scheduler-opts
create-flanneld-opts '127.0.0.1' '${MASTER_IP}'
Expand Down Expand Up @@ -487,7 +487,8 @@ function provision-masterandnode() {
create-kube-apiserver-opts \
'${SERVICE_CLUSTER_IP_RANGE}' \
'${ADMISSION_CONTROL}' \
'${SERVICE_NODE_PORT_RANGE}'
'${SERVICE_NODE_PORT_RANGE}' \
'${MASTER_IP}'
create-kube-controller-manager-opts '${NODE_IPS}'
create-kube-scheduler-opts
create-kubelet-opts \
Expand Down

0 comments on commit 87bf85a

Please sign in to comment.