Configure Kaptain in a managed cluster to connect to the management cluster using the Dex OIDC Provider for authentication.
Prerequisites
- A management cluster.
- A managed cluster, into which Kaptain will be installed.
- The managed cluster is attached to the management cluster. (You will need to create a cluster via Kommander to have a managed Konvoy cluster.)
Kaptain configuration
To use the Kommander Dex instance for authentication with Kaptain, create the following resources:
- Create a Dex Client Identifier (ID) for the managed cluster
- Create a Dex Client secret corresponding to the Dex Client ID
and collect the following information:
- External OIDC provider endpoint and CA bundle from the management cluster
as shown in this guide.
Create a Dex Client
To create the external Dex Client ID, run the following commands on the (Kommander) management cluster:
Create the kubeflow-authservice
Dex Client:
Create a Dex Client Secret
Generate a secret to replace <kubeflow-authservice-secret>
.
Example:
To create a Dex client secret, run the following command on the management cluster:
After creating the kubeflow-authservice
secret, display the $DEX_CLIENT_SECRET
value to use it later in this procedure:
The output should look like this:
Get external OIDC provider endpoint and CA bundle
Get the management cluster’s OIDC provider endpoint as https://<management-cluster-url>/dex
, by running the following command:
To get the OIDC provider CA bundle, run the following command on the management cluster:
Install Kaptain
Create or update a configuration file named parameters.yaml
that includes the following properties:
The resulting configuration file should look similar to the following:
See Install Kaptain for more info. To install Kaptain through the Kommander UI, copy and paste the configuration values from the previous section into the Kommander UI and deploy the Kaptain application.
Add the redirect URL to Kaptain authentication service in the management cluster
Once Kaptain is up, get the redirect URL from Kaptain’s authentication service by running the following command on the managed cluster:
On the management cluster, add the Redirect URL to the redirectURLs
list of the Dex Client’s resource:
Log in to Kaptain using the management cluster’s Dex instance
Refer to the Kaptain login section to access Kaptains’s Kubeflow dashboard.