You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tidy up any old or broken Kubernetes clusters and contexts from your kubeconfig.
5
+
6
+
kubetrim tries to connect to each cluster in the current kubeconfig file, and removes any that are unreachable, or which error.
7
+
8
+
## Usage
9
+
10
+
```bash
11
+
$ kubectx
12
+
13
+
default
14
+
do-lon1-openfaas-cluster
15
+
kind-2
16
+
kind-ingress
17
+
18
+
$ kubetrim
19
+
20
+
kubetrim (dev) by Alex Ellis
21
+
22
+
Loaded: /home/alex/.kube/config. Checking..
23
+
- kind-2: ✅
24
+
- kind-ingress: ❌ - (failed to connect to cluster: Get "https://127.0.0.1:40349/api/v1/nodes": dial tcp 127.0.0.1:40349: connect: connection refused)
25
+
- default: ✅
26
+
- do-lon1-openfaas-cluster: ❌ - (failed to connect to cluster: Get "https://da39a3ee5e6b4b0d3255bfef95601890afd80709.k8s.ondigitalocean.co.uk/api/v1/nodes": dial tcp: lookup da39a3ee5e6b4b0d3255bfef95601890afd80709.k8s.ondigitalocean.co.uk on 127.0.0.53:53: no such host)
27
+
Updated: /home/alex/.kube/config (in 364ms).
28
+
29
+
$ kubectx
30
+
31
+
default
32
+
kind-2
33
+
```
34
+
35
+
Try out kubetrim without writing changes to the kubeconfig file:
0 commit comments