Skip to content

jsenon/kubextractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircleCI Go Report Card

KubExtract

This tool could be used to extract specific k8s configuration context from global config file

Build

go build kubextractor

Use package

go get -u github.com/jsenon/kubextractor

Prerequisite

You need to have kubectl command line properly installed and set to your PATH

Exec

Download kubextractor executable file in bin/

Command line

Extract kubernetes context ie. configuration user and endpoint.
				  Complete documentation is available at https://github.com/jsenon/kubextractor
				  After export Use kubectl config use-context YOURCONTEXT --kubeconfig output.json to use it

Usage:
  kubextractor [flags]

Flags:
  -c, --config string       k8s config file default ($HOME/.kube/config)
  -j, --configjson string   k8s config file JSON default ($HOME/.kube/config.json)
  -e, --context string      MANDATORY: Name of  context to extract
  -h, --help                help for kubextractor
  -o, --output string       Name of output file

TIPS

Use Help if need

kubextractor -h

Todo

As seen by @VixsTy refactor and use https://github.com/kubernetes/client-go/blob/master/tools/clientcmd/api/types.go

About

Extract Kube Config from global config file

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages