To connect to your Kubernetes cluster from outside your DC/OS cluster, you will now need to set up and configure the Edge-LB service for inbound load-balancing to your private Kubernetes cluster.
To set up Edge-LB for DC/OS Kubernetes you will need to:
- Configure Edge-LB on your cluster and deploy the configured pool for Kubernetes including:
- setting up a service account for Edge-LB
- installing Edge-LB, including the CLI plugin
Set up and Install Edge-LB with service account
-
First, add the Edge-LB repositories, replacing the download links with the latest available binaries, this example links to DC/OS Edge-LB 1.2.3:
-
Next, create an Edge-LB service account:
-
Then, create an options JSON file to install Edge-LB with its service account.
Here we create
edge-lb-options.json
and add the following configuration snippet:Save the file.
-
Lastly, install the
edgelb
package on your DC/OS Enterprise cluster.In your CLI, enter:
Create and launch an Edge-LB configured pool deployment for your Kubernetes services
-
Next, save the following Kubernetes/Edge-LB Service configuration as
edgelb.json
.Copy for your convenience:
and paste in the file using your text editor.
-
Next, deploy the Edge-LB configured pool for your Kubernetes service:
In your CLI, enter:
-
List your Edge-LB configured pools.
and confirm your output looks similar to the following:
-
Check that the status of your Edge-LB deployment is in
TASK_RUNNING
state (underSTATE
):The responding output should look like the following:
-
Find the public IP of the deployment:
-
Save the IP as a variable:
Next Step: Test Kubernetes connections and view the Kubernetes dashboard
Now you have configured Edge-LB to connect to your Kubernetes clusters. In the last section, you will test connections and view the Kubernetes Dashboard via a web proxy on your browser.