To install dklb
, the following prerequisites must be met:
-
An MKE
v2.2.0-1.13.3
(or later) cluster.-
The current kubeconfig context must be configured to point at this cluster.
-
To install dklb
, the following commands may be run from the root of this repository:
$ hack/service-account.sh
$ kubectl create -f docs/deployment/00-prereqs.yaml
$ kubectl create -f docs/deployment/10-deployment.yaml
This will create a DC/OS service account for dklb, a Kubernetes secret named dklb-dcos-config
and dklb
deployment in the kube-system
namespace having two replicas:
$ kubectl -n kube-system get pod --selector "app=dklb"
NAME READY STATUS RESTARTS AGE
dklb-756c6c7d88-cgp69 1/1 Running 0 5m45s
dklb-756c6c7d88-slddz 1/1 Running 0 5m45s
The Kubernetes secret dklb-dcos-config
, created by hack/service-account.sh
script, contains the DC/OS service account secret required to access your DC/OS cluster. It’s used to setup TLS for you EdgeLB pools.
By default, EdgeLB pools are created on the dcos-edgelb/pools
service group.
In some DC/OS clusters, however, it may be required to customize the service group where EdgeLB pools are created.
This may happen, for example, if EdgeLB itself is installed under a different service group (e.g. networking/dcos-edgelb
).
In order to achieve this, the following flag must be provided as an argument to dklb
:
--edgelb-pool-group=<edgelb-pool-group>
At any given time, only a single replica is actively working in order to satisfy Ingress/Service resources. This replica is called the leader. Inspecting the logs of any of the two pods allows for checking which one is the current leader:
$ kubectl -n kube-system logs dklb-756c6c7d88-cgp69 | grep leader
time="2018-12-28T16:55:12Z" level=info msg="current leader: dklb-756c6c7d88-slddz"
This means that the current leader is the dklb-756c6c7d88-slddz
pod.
To understand what dklb
is currently doing, it is necessary to tail the logs of this same pod:
$ kubectl -n kube-system logs dklb-756c6c7d88-slddz
time="2018-12-28T16:54:55Z" level=info msg="dklb is starting" version=0ab11a8-dev
time="2018-12-28T16:54:55Z" level=info msg="detected edgelb version: v1.2.3-22-ga35988a"
(...)
time="2018-12-28T16:55:11Z" level=debug msg="starting workers" controller=service-controller
time="2018-12-28T16:55:11Z" level=info msg="started workers" controller=service-controller
time="2018-12-28T16:55:11Z" level=debug msg="starting workers" controller=ingress-controller
time="2018-12-28T16:55:11Z" level=info msg="started workers" controller=ingress-controller
(...)
To uninstall dklb
, the following commands may be run from the root of this repository:
$ kubectl delete -f docs/deployment/10-deployment.yaml
$ kubectl delete -f docs/deployment/00-prereqs.yaml
Additionally, the admission webhook must be manually unregistered using the following command:
$ kubectl delete mutatingwebhookconfiguration dklb
ℹ️
|
Deleting dklb DOES NOT delete any EdgeLB pools that may have been created.
|