root@kube-worker:/data/cal# tanzu login
? Select login type Local kubeconfig
? Enter path to kubeconfig (if any) ~/.kube/config
? Enter kube context to use tkgmgmt-admin@tkgmgmt
? Give the server a name tkgmgmt
✖ failed to login to the management cluster tkgmgmt, err-unable to read kubeconfig
Error: exit status 1
✖ exit status 1
tanzu login
? Select a server + new server
? Select login type Local kubeconfig
? Enter path to kubeconfig (if any) /root/.kube/config
? Enter kube context to use oom-mgmt-admin@oom-mgmt
? Give the server a name oom-mgmt
✔ successfully logged in to management cluster using the kubeconfig oom-mgmt
Alternatively, you can also use the command below. In this command, a relative path can be specified
tanzu login --kubeconfig ~/.kube/config --context tkgmgmt-admin@tkgmgmt --name tkgmgmt
✔ successfully logged in to management cluster using the kubeconfig tkgmgmt