Kdiscover is a simple utility to list and configure access to all clusters it can find. The basic usecase revolves in having access to a lot of clusters but you still need to discover and export apposite kubeconfig.
Currently we suport only EKS clusters but there are plans to support othe k8s providers (GKE, AKE, etc ...)
~ $ kubectl discover aws list
┌────────────────────────────────────────────────────────────────────────────────┐
│ cluster name region status exported locally │
├────────────────────────────────────────────────────────────────────────────────┤
│ 1 production-us us-east-1 ACTIVE No │
│ 2 production-eu eu-west-1 ACTIVE No │
│ 3 dev-eu eu-central-1 ACTIVE No │
│ 4 sandbox-eu eu-central-1 ACTIVE No │
├────────────────────────────────────────────────────────────────────────────────┤
│ number of clusters 4 │
└────────────────────────────────────────────────────────────────────────────────┘
~ $ kubectl discover aws update
Update all EKS Clusters
Found 4 clusters remote
Backup kubeconfig to /Users/tuxy/.kube/config.bak
~ $ kubectl discover aws list
┌────────────────────────────────────────────────────────────────────────────────┐
│ cluster name region status exported locally │
├────────────────────────────────────────────────────────────────────────────────┤
│ 1 production-us us-east-1 ACTIVE Yes │
│ 2 production-eu eu-west-1 ACTIVE Yes │
│ 3 dev-eu eu-central-1 ACTIVE Yes │
│ 4 sandbox-eu eu-central-1 ACTIVE Yes │
├────────────────────────────────────────────────────────────────────────────────┤
│ number of clusters 4 │
└────────────────────────────────────────────────────────────────────────────────┘
Columns in the list :
cluster name
is the name of the cluster based on the configurationregion
region where the cluster is deployed (it is cloud specific)status
this is reported by the cloud, if the cluster is up or in another state (modifying, down, creating ... etc)exported locally
uses an heuristic too see if the local config already has information about this cluster
Using the Krew plugin manager:
kubectl krew install discover
Note that in this context the command will need to invoked using kubectl discover
.
You can also install a binary release on macOS using brew:
brew install mateimicu/tap/kdiscover
brew upgrade mateimicu/tap/kdiscover
Note that in this context the executable is name kdiscover
.
You can download a specific version from the release page
GO111MODULE=on go get github.com/mateimicu/kdiscover
Development is tracked in this board and we also have specific milestones