-
Notifications
You must be signed in to change notification settings - Fork 53
HA kubeapi load balancer
Tim Van Steenburgh edited this page Jul 2, 2018
·
3 revisions
In the default CDK bundle, the kubeapi-load-balancer is a single point of failure. To remove this SPOF, add a unit of kubeapi-load-balancer and deploy the keepalived charm to manage a virtual IP for the kubeapi-load-balancer units.
# These instructions assume you've deployed CDK already:
# juju deploy canonical-kubernetes
# deploy the keepalived charm
juju deploy keepalived
# add new keepalived relations
juju relate keepalived:juju-info kubeapi-load-balancer:juju-info
juju relate keepalived:lb-sink kubeapi-load-balancer:website
juju relate keepalived:loadbalancer kubernetes-master:loadbalancer
juju relate keepalived:website kubernetes-worker:kube-api-endpoint
# remove CDK relations that are no longer needed
juju remove-relation kubernetes-worker:kube-api-endpoint kubeapi-load-balancer:website
# NOTE: ensure this relation from CDK is preserved, so that the
# load-balancer knows about backend endpoints
juju relate kubernetes-master:kube-api-endpoint kubeapi-load-balancer:apiserver || true
# configure keepalived (values are examples, substitute your own)
export VIP_HOSTNAME=test.example.com
juju config keepalived virtual_ip=10.10.74.250
juju config keepalived port=443
juju config keepalived vip_hostname=$VIP_HOSTNAME
# set extra_sans to update api server ssl cert
juju config kubeapi-load-balancer extra_sans=$VIP_HOSTNAME
juju config kubernetes-master extra_sans=$VIP_HOSTNAME
# if you only have one kubeapi-load-balancer unit, add another one
juju add-unit kubeapi-load-balancer