Add load balancers in front of kube-master node
Add a load balancer for kube-apiserver and another one for etcd server. We are going to support multiple master nodes and the introduction of load balancers is the first step. Change-Id: I1c4b4e3d801d4f955bfd48c26e36c340cff8da19 Partially-Implements: blueprint make-master-ha
This commit is contained in:
parent
e0a65684e3
commit
f03dfad417
|
@ -302,6 +302,67 @@ resources:
|
||||||
floating_network: {get_param: external_network}
|
floating_network: {get_param: external_network}
|
||||||
port_id: {get_resource: kube_master_eth0}
|
port_id: {get_resource: kube_master_eth0}
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
#
|
||||||
|
# load balancers.
|
||||||
|
#
|
||||||
|
|
||||||
|
api_monitor:
|
||||||
|
type: OS::Neutron::HealthMonitor
|
||||||
|
properties:
|
||||||
|
type: TCP
|
||||||
|
delay: 5
|
||||||
|
max_retries: 5
|
||||||
|
timeout: 5
|
||||||
|
|
||||||
|
api_pool:
|
||||||
|
type: OS::Neutron::Pool
|
||||||
|
properties:
|
||||||
|
protocol: HTTP
|
||||||
|
monitors: [{get_resource: api_monitor}]
|
||||||
|
subnet: {get_resource: fixed_subnet}
|
||||||
|
lb_method: ROUND_ROBIN
|
||||||
|
vip:
|
||||||
|
protocol_port: 8080
|
||||||
|
|
||||||
|
api_pool_member:
|
||||||
|
type: OS::Neutron::PoolMember
|
||||||
|
properties:
|
||||||
|
pool_id: {get_resource: api_pool}
|
||||||
|
address: {get_attr: [kube_master_eth0, fixed_ips, 0, ip_address]}
|
||||||
|
protocol_port: 8080
|
||||||
|
|
||||||
|
api_pool_floating:
|
||||||
|
type: OS::Neutron::FloatingIP
|
||||||
|
properties:
|
||||||
|
floating_network: {get_param: external_network}
|
||||||
|
port_id: {get_attr: [api_pool, vip, port_id]}
|
||||||
|
|
||||||
|
etcd_monitor:
|
||||||
|
type: OS::Neutron::HealthMonitor
|
||||||
|
properties:
|
||||||
|
type: TCP
|
||||||
|
delay: 5
|
||||||
|
max_retries: 5
|
||||||
|
timeout: 5
|
||||||
|
|
||||||
|
etcd_pool:
|
||||||
|
type: OS::Neutron::Pool
|
||||||
|
properties:
|
||||||
|
protocol: HTTP
|
||||||
|
monitors: [{get_resource: etcd_monitor}]
|
||||||
|
subnet: {get_resource: fixed_subnet}
|
||||||
|
lb_method: ROUND_ROBIN
|
||||||
|
vip:
|
||||||
|
protocol_port: 4001
|
||||||
|
|
||||||
|
etcd_pool_member:
|
||||||
|
type: OS::Neutron::PoolMember
|
||||||
|
properties:
|
||||||
|
pool_id: {get_resource: etcd_pool}
|
||||||
|
address: {get_attr: [kube_master_eth0, fixed_ips, 0, ip_address]}
|
||||||
|
protocol_port: 4001
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
# kubernetes minions. This is an autoscaling group that will initially
|
# kubernetes minions. This is an autoscaling group that will initially
|
||||||
|
@ -333,6 +394,15 @@ resources:
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
|
|
||||||
|
api_address:
|
||||||
|
value:
|
||||||
|
str_replace:
|
||||||
|
template: api_ip_address:8080
|
||||||
|
params:
|
||||||
|
api_ip_address: {get_attr: [api_pool_floating, floating_ip_address]}
|
||||||
|
description: >
|
||||||
|
This is the IP address and port of the Kubernetes API server.
|
||||||
|
|
||||||
kube_master:
|
kube_master:
|
||||||
value: {get_attr: [kube_master_floating, floating_ip_address]}
|
value: {get_attr: [kube_master_floating, floating_ip_address]}
|
||||||
description: >
|
description: >
|
||||||
|
|
Loading…
Reference in New Issue