kdiscover

command module
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2023 License: MIT Imports: 2 Imported by: 0

README

kdiscover

CI CodeQL codecov GitHub release (latest SemVer) GitHub go.mod Go version GitHub FOSSA Status Go Report Card

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 ...)

Example

~ $ 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 configuration
  • region 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

Install

Using the Krew plugin manager:

kubectl krew install discover

Note that in this context the command will need to invoked using kubectl discover.

macOs

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.

Binary

You can download a specific version from the release page

Go

GO111MODULE=on go get github.com/mateimicu/kdiscover

Future Plans

Development is tracked in this board and we also have specific milestones

License

FOSSA Status

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package cmd offers CLI functionality
Package cmd offers CLI functionality
internal
aws
Package internal provides wrapper for creating aws sessions
Package internal provides wrapper for creating aws sessions
cluster
Package internal provides function for working with EKS cluseters
Package internal provides function for working with EKS cluseters
kubeconfig
Package internal provides function to update kubeconfigs
Package internal provides function to update kubeconfigs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL