Unable to access kubernetes cluster using oci cli multi-profile
I have configured a multi-profile setup for the OCI CLI utility on my PC. I can successfully connect to different tenancies with the configured OCI CLI using the - -profile .
I have also added two Kubernetes clusters to the config file .kube directory. When I switch contexts to the cluster associated with the oci profile [DEFAULT], I can do a Kubectl get nodes and everything works fine. But when I switch context to the other cluster and repeat the kubectl command, I get the error: You must be logged in to the server (Unauthorized)
. If I make the second oci profile the default profile, I can access the cluster returning the error message.