sigs.k8s.io/cluster-api@v1.7.1/docs/book/src/clusterctl/commands/get-kubeconfig.md (about)

     1  # clusterctl get kubeconfig
     2  
     3  This command prints the kubeconfig of an existing workload cluster into stdout.
     4  This functionality is available in clusterctl v0.3.9 or newer.
     5  
     6  ## Examples
     7  
     8  Get the kubeconfig of a workload cluster named foo.
     9  
    10  ```bash
    11  clusterctl get kubeconfig foo
    12  ```
    13  
    14  Get the kubeconfig of a workload cluster named foo in the namespace bar
    15  
    16  ```bash
    17  clusterctl get kubeconfig foo --namespace bar
    18  ```
    19  
    20  Get the kubeconfig of a workload cluster named foo using a specific context bar
    21  
    22  ```bash
    23  clusterctl get kubeconfig foo --kubeconfig-context bar
    24  ```