kubectl

package
v0.0.0-...-6ea13ce Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KubectlURLTemplate = "https://storage.googleapis.com/kubernetes-release/release/v{{ .Version }}/bin/{{ .OS }}/{{ .Arch }}/kubectl"
	HomeDir            = homedir.HomeDir
)

KubectlURLTemplate defines the pattern of download URLs for kubectl Edit this value to use a custom location

Functions

func Command

func Command(version string, args ...string) *exec.Cmd

Command instanciates a new command for a given version

func Download

func Download(version string) error

Download downloads a specific kubectl version to Path()

func Exec

func Exec(version string, args ...string) int

Exec executes the Command and returns the status code in case of an error

func Installed

func Installed(version string) bool

Installed returns wether the kubectl version is already installed or not

func Path

func Path(version string) string

Path retrieves the path of kubectl for a given version

func Reset

func Reset()

Reset resets the package variables that could have been modified from outside

func Run

func Run(version string, args ...string) error

Run executes the Command, binding standard input and outputs

func URL

func URL(version string) string

URL returns the URL where a given kubectl version should be downloaded from

Types

This section is empty.

Jump to

Keyboard shortcuts

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