Closed cormachogan closed 3 years ago
Seems like a known issue. Followed the workaround instructions (add load balancer services to Dex and Pinniped), I was able to use an AD user to access the management cluster.
However, the issue is still apparent on the workload cluster. Will discuss with @stuclem tomorrow.
In the off chance that this was because my workload cluster was created before the workaround was put on the management cluster, I deployed a new workload cluster after the management cluster was setup. No dice! On my new workload cluster, I still hit the "can't access address" error:
% tanzu cluster kubeconfig get workload2
Error: failed to get cluster-info from cluster: failed to get cluster-info from the end-point: Get "https://:0/api/v1/namespaces/kube-public/configmaps/cluster-info": dial tcp :0: connect: can't assign requested address
It only works with the --admin extension:
% tanzu cluster kubeconfig get workload2 --admin
Credentials of cluster 'workload2' have been saved
You can now access the cluster by running 'kubectl config use-context workload2-admin@workload2'
This issue is addressed in a later build (i.e. TKG v1.4), but was not addressed in TCE v0.7.0. Will close this issue, and retry procedure with TCE v0.8.0-rc2.
Bug Report
Deployed TKG mgmt on vSphere with NSX ALB providing load balancer service. Deployed TKG workload cluster on vSphere with NSX ALB as well.
On trying to get kubeconfig for workload as non-admin user, I get the following error:
Interestingly, this is the same error I get when I try to get the kubeconfig as a non-admin when Pinniped is not configured. See #1614 .
A kubeconfig get with the --admin option works.
Expected Behavior
In the past, the kubeconfig get command succeeded (TKG v1.3.1) as a non-admin user. However, an attempt to query the workload cluster would launch the Dex console where the AD credentials for the developer could be added. An admin could then add the same credentials to the workload cluster through a ClusterRoleBinding, and that user/developer would then be able to successfully query the workload cluster without admin privileges. I am not able to repeat these steps in this version.
Steps to Reproduce the Bug
Build a TKG mgmt and workload cluster with NSX ALB and Pinniped on vSphere:
MGMT
Workload
I also tried to manually connect to Dex (https://10.27.62.16:30167) but it did not work. There are no errors in the Dex logs either that I could see.
Environment Details
Build version (
tanzu version
):version: v1.4.0-pre-alpha-2
buildDate: 2021-08-19 sha: 75cfa0e
Operating System (client): macOS (Big Sur) v11.5.2 vSphere 7.0U2c NSX ALB v2.1.0.5