Closed brendankellyibm closed 2 months ago
@in-1911 let me know if there's potentially an issue with using the login command so frequently - I was initially going to use oc get projects
to do the check but it's not as reliable and doesn't provide enough context in its output.
@brendankellyibm - have you tried using ibmcloud oc cluster config
(may with --admin
) to get the cluster credentials? I wonder if checking the result of that may be easier and more reliable.
That command results in the following:
brendankelly@Brendans-MBP ~ % ibmcloud oc cluster config -c bk-rag-slz-workload-cluster --admin
OK
The configuration for bk-rag-slz-workload-cluster was downloaded successfully.
Added context for bk-rag-slz-workload-cluster to the current kubeconfig file.
You can now execute 'kubectl' commands against your cluster. For example, run 'kubectl get nodes'.
If you are accessing the cluster for the first time, 'kubectl' commands might fail for a few seconds while RBAC synchronizes.
It actually calls out the RBAC synchronisation but doesn't really provide any insight into whether it's complete.
@in-1911 I believe it works now - I changed it to use oc get nodes
and removed the redundant oc login
command.