CertGrid CertGrid
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

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.

All four clusters, reached from one Windows workstation. Colour groups the rows by cluster.
Server NameIP AddressOSRolesCPURAMHDD
CKA1001192.168.0.175Ubuntu 26.04 LTSControl Plane Node2 Core4 GB50 GB
CKA1001-NODE01192.168.0.176Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE02192.168.0.177Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE03192.168.0.178Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA2001192.168.0.181Ubuntu 26.04 LTSControl Plane Node2 Core4 GB50 GB
CKA2001-NODE01192.168.0.182Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA2001-NODE02192.168.0.183Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA3001192.168.0.185Ubuntu 26.04 LTSControl Plane Node2 Core4 GB50 GB
CKA3001-NODE01192.168.0.186Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA4001192.168.0.191Ubuntu 26.04 LTSControl Plane Node2 Core4 GB50 GB

Before you start

  1. Install kubectl on Windows

  2. Understand what you are about to copy

  3. Copy each cluster's config across, renaming as you go

  4. Back up the kubeconfig you already have

  5. Merge, and mind the separator

  6. Deal with duplicates: first file wins

  7. Install it and check every cluster answers

  8. Switch contexts, and avoid the obvious accident

Official sources