Skip to content

It will list resources from every GKE cluster running on a specific project

Notifications You must be signed in to change notification settings

framsouza/list-gke-resources

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Listing gke resources

This is a simple code that will list the Kubernetes resources using client-go. The resources available at the moment is, pods, deployments, nodes, statefulsets, policysecurity and version.

Usage

You must specify the project and resource you want to check by adding the -project and -resource parameters, like this:

go run main.go -project=myproject -resource=pods

You will get an output similar to this:

GKE NAME                          RESOURCE NAME                          NAMESPACE            
migration-test                    event-exporter-gke                     kube-system          
migration-test                    konnectivity-agent                     kube-system          
migration-test                    konnectivity-agent-autoscaler          kube-system          
migration-test                    kube-dns                               kube-system          
migration-test                    kube-dns-autoscaler                    kube-system          
migration-test                    l7-default-backend                     kube-system          
migration-test                    metrics-server-v0.4.5                  kube-system          

GKE NAME                                             RESOURCE NAME                          NAMESPACE            
migration-test-twenty-two-version                    event-exporter-gke                     kube-system          
migration-test-twenty-two-version                    konnectivity-agent                     kube-system          
migration-test-twenty-two-version                    konnectivity-agent-autoscaler          kube-system          
migration-test-twenty-two-version                    kube-dns                               kube-system          
migration-test-twenty-two-version                    kube-dns-autoscaler                    kube-system          
migration-test-twenty-two-version                    l7-default-backend                     kube-system          
migration-test-twenty-two-version                    metrics-server-v0.4.5                  kube-system          
migration-test-twenty-two-version                    event-exporter-gke                     kube-system          
migration-test-twenty-two-version                    konnectivity-agent                     kube-system          
migration-test-twenty-two-version                    konnectivity-agent-autoscaler          kube-system          
migration-test-twenty-two-version                    kube-dns                               kube-system          
migration-test-twenty-two-version                    kube-dns-autoscaler                    kube-system          
migration-test-twenty-two-version                    l7-default-backend                     kube-system          
migration-test-twenty-two-version                    metrics-server-v0.4.5                  kube-system   

About

It will list resources from every GKE cluster running on a specific project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages