mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-28 05:59:03 +00:00
updating example
This commit is contained in:
@@ -30,10 +30,19 @@ If Rancher Server uses a self-signed certificate, Rancher CLI prompts you to con
|
|||||||
|
|
||||||
Rancher CLI uses a _context_ to determine what resources to fetch when running commands. Context is another name for the [cluster]({{< baseurl >}}/rancher/v2.x/en/concepts/clusters/)/[project]({{< baseurl >}}/rancher/v2.x/en/concepts/projects/) that's currently in focus. It's the command line equivalent of making a selection from the **Global** menu in the Rancher UI.
|
Rancher CLI uses a _context_ to determine what resources to fetch when running commands. Context is another name for the [cluster]({{< baseurl >}}/rancher/v2.x/en/concepts/clusters/)/[project]({{< baseurl >}}/rancher/v2.x/en/concepts/projects/) that's currently in focus. It's the command line equivalent of making a selection from the **Global** menu in the Rancher UI.
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
The `./rancher context switch` command displays a list of contexts available and allows the user to change contexts.
|
The `./rancher context switch` command displays a list of contexts available and allows the user to change contexts.
|
||||||
|
|
||||||
|
**Example: `./rancher context switch` Output**
|
||||||
|
```
|
||||||
|
User:rancher-cli-directory user$ ./rancher context switch
|
||||||
|
NUMBER CLUSTER NAME PROJECT ID PROJECT NAME
|
||||||
|
1 cluster-2 c-7q96s:p-h4tmb project-2
|
||||||
|
2 cluster-2 c-7q96s:project-j6z6d Default
|
||||||
|
3 cluster-1 c-lchzv:p-xbpdt project-1
|
||||||
|
4 cluster-1 c-lchzv:project-s2mch Default
|
||||||
|
Select a Project:
|
||||||
|
```
|
||||||
|
|
||||||
**Other Common Commands:**
|
**Other Common Commands:**
|
||||||
|
|
||||||
* `rancher ps`
|
* `rancher ps`
|
||||||
|
|||||||
Reference in New Issue
Block a user