This topic tells you how to view your runtime resources on a remote EKS cluster in Tanzu Developer Portal. For more information, see View runtime resources on remote clusters.
You must set up the OIDC provider to enable RBAC visibility of remote EKS clusters. You can see the list of supported OIDC providers in Setting up a Tanzu Developer Portal authentication provider.
Tanzu Developer Portal supports multiple OIDC providers. Auth0 is used here as an example.
-
Log in to the Auth0 dashboard.
-
Go to Applications.
-
Create an application of the type
Single Page Web Application
namedTAP-GUI
or a name of your choice. -
Click the Settings tab.
-
Under Application URIs > Allowed Callback URLs, add
https://tap-gui.INGRESS-DOMAIN/api/auth/auth0/handler/frame
Where
INGRESS-DOMAIN
is the domain you chose for your Tanzu Developer Portal in Installing the Tanzu Application Platform package and profiles. -
Click Save Changes.
After creating an application with your OIDC provider, you receive the following credentials for setting up RBAC for your remote cluster:
- Domain, which is used as
ISSUER-URL
in the following sections (AUTH0_DOMAIN
for Auth0) - Client ID, which is used as
CLIENT-ID
in the following sections - Client Secret, which is used as
CLIENT-SECRET
in the following sections
For more information, see Auth0 Setup Walkthrough in the Backstage documentation. To configure other OIDC providers, see Authentication in Backstage in the Backstage documentation.
To configure the cluster with the OIDC provider's credentials:
-
Create a file with the following content and name it
rbac-setup.yaml
. This content applies to EKS clusters.apiVersion: eksctl.io/v1alpha5 kind: ClusterConfig metadata: name: "CLUSTER-NAME" region: "AWS-REGION" identityProviders: - name: auth0 type: oidc issuerUrl: "ISSUER-URL" clientId: "CLIENT-ID" usernameClaim: email
Where:
CLUSTER-NAME
is the cluster name for your EKS cluster as an AWS identifierAWS-REGION
is the AWS region of the EKS clusterCLIENT-ID
is the Client ID you obtained while setting up the OIDC providerISSUER-URL
is the Issuer URL you obtained while setting up the OIDC provider. For Auth0, this ishttps://${AUTH0_DOMAIN}/
.
-
Using
eksctl
, run:eksctl associate identityprovider -f rbac-setup.yaml
-
Verify that the association of the OIDC provider with the EKS cluster was successful by running:
eksctl get identityprovider --cluster CLUSTER-NAME
Where
CLUSTER-NAME
is the cluster name for your EKS cluster as an AWS identifierVerify that the output shows
ACTIVE
in theSTATUS
column.
Configure visibility of the remote cluster in Tanzu Developer Portal:
-
Obtain your cluster's URL by running:
CLUSTER_URL=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}') echo CLUSTER-URL: $CLUSTER_URL
This command returns the URL of the first configured cluster in your
kubeconfig
file. To view other clusters one by one, edit the number in.clusters[0].cluster.server
or edit the command to view all the configured clusters. -
Ensure you have an
auth
section in theapp_config
section that Tanzu Developer Portal uses. In the example for Auth0, copy this YAML content intotap-values.yaml
:auth: environment: development providers: auth0: development: clientId: "CLIENT-ID" clientSecret: "CLIENT-SECRET" domain: "ISSUER-URL"
Where:
CLIENT-ID
is the Client ID you obtained while setting up the OIDC provider.CLIENT-SECRET
is the Client Secret you obtained while setting up the OIDC provider.ISSUER-URL
is the Issuer URL you obtained while setting up the OIDC provider. For Auth0, it is onlyAUTH0_DOMAIN
.
-
Add a
kubernetes
section to theapp_config
section that Tanzu Developer Portal uses. This section must have an entry for each cluster that has resources to view. To do so, copy this YAML content intotap-values.yaml
:kubernetes: serviceLocatorMethod: type: 'multiTenant' clusterLocatorMethods: - type: 'config' clusters: - name: "CLUSTER-NAME-UNCONSTRAINED" url: "CLUSTER-URL" authProvider: oidc oidcTokenProvider: auth0 skipTLSVerify: true skipMetricsLookup: true
Where:
CLUSTER-NAME-UNCONSTRAINED
is the cluster name of your choice for your EKS clusterCLUSTER-URL
is the URL for the remote cluster you are connecting to Tanzu Developer Portal. You obtained this earlier in the procedure.
If there are any other clusters that you want to make visible in Tanzu Developer Portal, add their entries to
clusters
as well.
After the new configuration file is ready, update the tap
package:
-
Run:
tanzu package installed update tap --values-file tap-values.yaml
-
Wait a moment for the
tap-gui
package to update and then verify thatSTATUS
isReconcile succeeded
by running:tanzu package installed get tap-gui -n tap-install