Replace etcd ports by its offical ports
Port 2379 and 2380 are offical ports for etcd. So it's better to use them. http://www.iana.org/assignments/service-names-port-numbers/ service-names-port-numbers.xhtml?search=etcd Change-Id: Ie0f32758a2ef0cce679a9a0c9a456bb08c5b36d2 Closes-Bug: #1480025
This commit is contained in:
parent
f9e783983e
commit
68bfde02ca
|
@ -8,10 +8,10 @@ awk '$1 == "inet" {print $2}' | cut -f1 -d/)
|
|||
cat > /etc/etcd/etcd.conf <<EOF
|
||||
ETCD_NAME="$myip"
|
||||
ETCD_DATA_DIR="/var/lib/etcd/default.etcd"
|
||||
ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:4001"
|
||||
ETCD_LISTEN_PEER_URLS="http://$myip:7001"
|
||||
ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:2379"
|
||||
ETCD_LISTEN_PEER_URLS="http://$myip:2380"
|
||||
|
||||
ETCD_ADVERTISE_CLIENT_URLS="http://$myip:4001"
|
||||
ETCD_INITIAL_ADVERTISE_PEER_URLS="http://$myip:7001"
|
||||
ETCD_ADVERTISE_CLIENT_URLS="http://$myip:2379"
|
||||
ETCD_INITIAL_ADVERTISE_PEER_URLS="http://$myip:2380"
|
||||
ETCD_DISCOVERY="$ETCD_DISCOVERY_URL"
|
||||
EOF
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
echo "configuring kubernetes (master)"
|
||||
sed -i '
|
||||
/^ETCD_LISTEN_CLIENT_URLS=/ s/=.*/="http:\/\/0.0.0.0:4001"/
|
||||
/^ETCD_LISTEN_CLIENT_URLS=/ s/=.*/="http:\/\/0.0.0.0:2379"/
|
||||
' /etc/etcd/etcd.conf
|
||||
|
||||
sed -i '
|
||||
|
@ -15,6 +15,7 @@ sed -i '
|
|||
/^KUBE_API_ADDRESS=/ s/=.*/="--address=0.0.0.0"/
|
||||
/^KUBE_SERVICE_ADDRESSES=/ s|=.*|="--portal_net='"$PORTAL_NETWORK_CIDR"'"|
|
||||
/^KUBE_API_ARGS=/ s/=.*/="--runtime_config=api\/v1beta3"/
|
||||
/^KUBE_ETCD_SERVERS=/ s/=.*/="--etcd_servers=http:\/\/127.0.0.1:2379"/
|
||||
' /etc/kubernetes/apiserver
|
||||
|
||||
sed -i '
|
||||
|
|
|
@ -12,7 +12,7 @@ ETCD_SERVER_IP=${ETCD_SERVER_IP:-$KUBE_MASTER_IP}
|
|||
|
||||
sed -i '
|
||||
/^KUBE_ALLOW_PRIV=/ s/=.*/="--allow_privileged='"$KUBE_ALLOW_PRIV"'"/
|
||||
/^KUBE_ETCD_SERVERS=/ s|=.*|="--etcd_servers=http://'"$ETCD_SERVER_IP"':4001"|
|
||||
/^KUBE_ETCD_SERVERS=/ s|=.*|="--etcd_servers=http://'"$ETCD_SERVER_IP"':2379"|
|
||||
' /etc/kubernetes/config
|
||||
|
||||
sed -i '
|
||||
|
@ -27,7 +27,7 @@ sed -i '
|
|||
' /etc/kubernetes/apiserver
|
||||
|
||||
sed -i '
|
||||
/^FLANNEL_ETCD=/ s|=.*|="http://'"$ETCD_SERVER_IP"':4001"|
|
||||
/^FLANNEL_ETCD=/ s|=.*|="http://'"$ETCD_SERVER_IP"':2379"|
|
||||
' /etc/sysconfig/flanneld
|
||||
|
||||
cat >> /etc/environment <<EOF
|
||||
|
|
|
@ -5,8 +5,8 @@ coreos:
|
|||
# generate a new token for each cluster from https://discovery.etcd.io/new
|
||||
discovery: https://discovery.etcd.io/$token
|
||||
# multi-region and multi-cloud deployments need to use $public_ipv4
|
||||
addr: $private_ipv4:4001
|
||||
peer-addr: $private_ipv4:7001
|
||||
addr: $private_ipv4:2379
|
||||
peer-addr: $private_ipv4:2380
|
||||
units:
|
||||
- name: etcd.service
|
||||
command: start
|
||||
|
|
|
@ -185,11 +185,11 @@ resources:
|
|||
port_range_min: 8080
|
||||
port_range_max: 8080
|
||||
- protocol: tcp
|
||||
port_range_min: 4001
|
||||
port_range_max: 4001
|
||||
port_range_min: 2379
|
||||
port_range_max: 2379
|
||||
- protocol: tcp
|
||||
port_range_min: 7001
|
||||
port_range_max: 7001
|
||||
port_range_min: 2380
|
||||
port_range_max: 2380
|
||||
|
||||
######################################################################
|
||||
#
|
||||
|
|
|
@ -185,7 +185,7 @@ resources:
|
|||
subnet: {get_resource: fixed_subnet}
|
||||
lb_method: ROUND_ROBIN
|
||||
vip:
|
||||
protocol_port: 4001
|
||||
protocol_port: 2379
|
||||
|
||||
######################################################################
|
||||
#
|
||||
|
|
|
@ -119,11 +119,11 @@ resources:
|
|||
port_range_min: 8080
|
||||
port_range_max: 8080
|
||||
- protocol: tcp
|
||||
port_range_min: 4001
|
||||
port_range_max: 4001
|
||||
port_range_min: 2379
|
||||
port_range_max: 2379
|
||||
- protocol: tcp
|
||||
port_range_min: 7001
|
||||
port_range_max: 7001
|
||||
port_range_min: 2380
|
||||
port_range_max: 2380
|
||||
|
||||
######################################################################
|
||||
#
|
||||
|
@ -266,7 +266,7 @@ resources:
|
|||
properties:
|
||||
pool_id: {get_param: etcd_pool_id}
|
||||
address: {get_attr: [kube_master_eth0, fixed_ips, 0, ip_address]}
|
||||
protocol_port: 4001
|
||||
protocol_port: 2379
|
||||
|
||||
outputs:
|
||||
|
||||
|
|
Loading…
Reference in New Issue