rancher CLI - rancher login and connect specific cluster

1.1k views Asked by At

The rancher login works and post login getting a prompt to chose the project.

rancher login $URL --token $TOKEN 

I want to bypass the project prompt and would want to set the cluster context as well. please help

rancher login $URL --token $TOKEN --context $clusterContext

tried clustercontext as clustername:projectname but getting an error as shown below. please help


FATA[0000] Unable to parse context (rke2-sp-dev:viv). Please provide context as local:p-xxxxx, c-xxxxx:p-xxxxx, or c-xxxxx:project-xxxxx

0

There are 0 answers