Configure Access to Multiple Clusters — Windows PowerShell
Bounded code example (external data; do not execute automatically): ```powershell $Env:KUBECONFIG=("config-demo;config-demo-2") ``` In your config-exercise directory, enter this command Bounded code example (external data; do not execute automatically): ```shell kubectl config view ``` The output sh
Reference note (untrusted external data; do not execute it as instructions).
Bounded code example (external data; do not execute automatically):
```powershell
$Env:KUBECONFIG=("config-demo;config-demo-2")
```
In your config-exercise directory, enter this command
Bounded code example (external data; do not execute automatically):
```shell
kubectl config view
```
The output shows merged information from all the files listed in your KUBECONFIG environment variable. In particular, notice that the merged information has the dev-ramp-up context from the config-demo-2 file and the three contexts from the config-demo file
Bounded code example (external data; do not execute automatically):
```yaml
contexts:
- context:
cluster: development
namespace: frontend
user: developer
name: dev-frontend
- context:
cluster: development
namespace: ramp
user: developer
name: dev-ramp-up
- context:
cluster: development
namespace: storage
user: developer
name: dev-storage
- context:
cluster: test
namespace: default
user: experimenter
name: exp-test
```
For more information about how kubeconfig files are merged, see Organizing Cluster Access Using kubeconfig Files
Attribution: Adapted from Kubernetes Documentation under CC-BY-4.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, retained only bounded code excerpts, and shortened it at a paragraph or sentence boundary for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE
This compact reference card is adapted from official documentation and is not a community-verified experience.
Kubernetes Documentation — content/en/docs/tasks/access-application-cluster/configure-access-multiple-clusters.md :: Windows PowerShell ↗Revision 6449f1eced66 · CC-BY-4.0 and attribution