kubectl_reconnect
Recreates all API clients to reconnect to the Kubernetes API server, forcing fresh DNS resolution and new TCP connections after cluster upgrades.
Instructions
Reconnect to the Kubernetes API server by recreating all API clients. Use this after cluster upgrades (e.g., EKS control plane upgrades that rotate ENIs/IPs) to force fresh DNS resolution and new TCP connections.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- Helper method on KubernetesManager that recreates CoreV1Api, AppsV1Api, and BatchV1Api clients, forcing fresh DNS resolution.
public refreshApiClients(): void { this.k8sApi = this.kc.makeApiClient(k8s.CoreV1Api); this.k8sAppsApi = this.kc.makeApiClient(k8s.AppsV1Api); this.k8sBatchApi = this.kc.makeApiClient(k8s.BatchV1Api); }