After following the instructions in Retire TanzuKubernetesCluster Resources, you are no longer able to authenticate against the retired cluster and receive the message: error: You must be logged in to the server (Unauthorized) when running kubectl commands.
The Kubernetes Releases (KR) are affected:
The guest-cluster-auth-svc may not detect that the TKC has been retired and fails to restart automatically to pick up the changes.
1) Log into the supervisor context using kubectl
2) Get the cluster's kubeconfig file:
3) Retrieve the guest-cluster-aut-svc pods:
${KUBECONFIG} kubectl get pods -n vmware-system-auth -l name=guest-cluster-auth-svc
NAME READY STATUS RESTARTS AGE
guest-cluster-auth-svc-h9pww 1/1 Running 1 (46s ago) 67m
guest-cluster-auth-svc-kjhfm 1/1 Running 1 (96s ago) 69m
guest-cluster-auth-svc-sqlft 1/1 Running 1 (108s ago) 71m
4) Delete the guest-cluster-aut-svc pods so they will automatically get re-created:
${KUBECONFIG} kubectl delete pods -n vmware-system-auth -l name=guest-cluster-auth-svc