Configuration·Certified Kubernetes Administrator
kubeconfig Contexts and Multi-Cluster Access
Stop SSH-ing to the control plane to run kubectl. Install kubectl on Windows, copy each cluster's admin kubeconfig across, merge four clusters into one file without losing the contexts you already had, and switch between them by name.
Installation and Cluster Builds Guide 12 of 103 Beginner
- WorkstationWindows 11
- kubectl1.36 client
- Clusters4 (1, 2, 3 and 4 node)
- Kubernetes1.36.4
- TimeAbout 25 min
- Reviewed21 August 2026
Written against the versions above. Certificate data, cluster CAs and byte counts are specific to this lab. The Windows kubectl was installed with Chocolatey; winget or a direct download behave the same once kubectl is on PATH.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| CKA1001 | 192.168.0.175 | Ubuntu 26.04 LTS | Control Plane Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE01 | 192.168.0.176 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE02 | 192.168.0.177 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE03 | 192.168.0.178 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA2001 | 192.168.0.181 | Ubuntu 26.04 LTS | Control Plane Node | 2 Core | 4 GB | 50 GB |
| CKA2001-NODE01 | 192.168.0.182 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA2001-NODE02 | 192.168.0.183 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA3001 | 192.168.0.185 | Ubuntu 26.04 LTS | Control Plane Node | 2 Core | 4 GB | 50 GB |
| CKA3001-NODE01 | 192.168.0.186 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA4001 | 192.168.0.191 | Ubuntu 26.04 LTS | Control Plane Node | 2 Core | 4 GB | 50 GB |
Before you start
- At least one working cluster, and SSH access to its control plane.
- Windows 10 or 11 with a terminal you like. The commands below are shown from Git Bash; PowerShell equivalents are noted where they differ.
- Network reach from the workstation to each control plane on TCP 6443.
- Somewhere private to keep the file.
admin.confis a cluster-admin credential, not a config file.
-
Install kubectl on Windows
-
Understand what you are about to copy
-
Copy each cluster's config across, renaming as you go
-
Back up the kubeconfig you already have
-
Merge, and mind the separator
-
Deal with duplicates: first file wins
-
Install it and check every cluster answers
-
Switch contexts, and avoid the obvious accident