cmd

package
v1.14.9 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2019 License: Apache-2.0 Imports: 62 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddImagesCommonConfigFlags added in v1.11.0

func AddImagesCommonConfigFlags(flagSet *flag.FlagSet, cfg *kubeadmapiv1beta1.InitConfiguration, cfgPath *string, featureGatesString *string)

AddImagesCommonConfigFlags adds the flags that configure kubeadm (and affect the images kubeadm will use)

func AddInitConfigFlags added in v1.8.0

func AddInitConfigFlags(flagSet *flag.FlagSet, cfg *kubeadmapiv1beta1.InitConfiguration, featureGatesString *string)

AddInitConfigFlags adds init flags bound to the config to the specified flagset

func AddInitOtherFlags added in v1.8.0

func AddInitOtherFlags(flagSet *flag.FlagSet, initOptions *initOptions)

AddInitOtherFlags adds init flags that are not bound to a configuration file to the given flagset Note: All flags that are not bound to the cfg object should be allowed in cmd/kubeadm/app/apis/kubeadm/validation/validation.go

func AddKubeadmOtherFlags added in v1.12.0

func AddKubeadmOtherFlags(flagSet *pflag.FlagSet, rootfsPath *string)

AddKubeadmOtherFlags adds flags that are not bound to a configuration file to the given flagset

func GetSupportedShells added in v1.11.0

func GetSupportedShells() []string

GetSupportedShells returns a list of supported shells

func NewCmdCompletion added in v1.6.0

func NewCmdCompletion(out io.Writer, boilerPlate string) *cobra.Command

NewCmdCompletion returns the "kubeadm completion" command

func NewCmdConfig added in v1.8.0

func NewCmdConfig(out io.Writer) *cobra.Command

NewCmdConfig returns cobra.Command for "kubeadm config" command

func NewCmdConfigImages added in v1.11.0

func NewCmdConfigImages(out io.Writer) *cobra.Command

NewCmdConfigImages returns the "kubeadm config images" command

func NewCmdConfigImagesList added in v1.11.0

func NewCmdConfigImagesList(out io.Writer, mockK8sVersion *string) *cobra.Command

NewCmdConfigImagesList returns the "kubeadm config images list" command

func NewCmdConfigImagesPull added in v1.11.0

func NewCmdConfigImagesPull() *cobra.Command

NewCmdConfigImagesPull returns the `kubeadm config images pull` command

func NewCmdConfigMigrate added in v1.11.0

func NewCmdConfigMigrate(out io.Writer) *cobra.Command

NewCmdConfigMigrate returns cobra.Command for "kubeadm config migrate" command

func NewCmdConfigPrint added in v1.13.0

func NewCmdConfigPrint(out io.Writer) *cobra.Command

NewCmdConfigPrint returns cobra.Command for "kubeadm config print" command

func NewCmdConfigPrintInitDefaults added in v1.13.0

func NewCmdConfigPrintInitDefaults(out io.Writer) *cobra.Command

NewCmdConfigPrintInitDefaults returns cobra.Command for "kubeadm config print init-defaults" command

func NewCmdConfigPrintJoinDefaults added in v1.13.0

func NewCmdConfigPrintJoinDefaults(out io.Writer) *cobra.Command

NewCmdConfigPrintJoinDefaults returns cobra.Command for "kubeadm config print join-defaults" command

func NewCmdConfigUpload added in v1.8.0

func NewCmdConfigUpload(out io.Writer, kubeConfigFile *string) *cobra.Command

NewCmdConfigUpload returns cobra.Command for "kubeadm config upload" command

func NewCmdConfigUploadFromFile added in v1.8.0

func NewCmdConfigUploadFromFile(out io.Writer, kubeConfigFile *string) *cobra.Command

NewCmdConfigUploadFromFile verifies given Kubernetes config file and returns cobra.Command for "kubeadm config upload from-file" command

func NewCmdConfigUploadFromFlags added in v1.8.0

func NewCmdConfigUploadFromFlags(out io.Writer, kubeConfigFile *string) *cobra.Command

NewCmdConfigUploadFromFlags returns cobra.Command for "kubeadm config upload from-flags" command

func NewCmdConfigView added in v1.8.0

func NewCmdConfigView(out io.Writer, kubeConfigFile *string) *cobra.Command

NewCmdConfigView returns cobra.Command for "kubeadm config view" command

func NewCmdInit

func NewCmdInit(out io.Writer, initOptions *initOptions) *cobra.Command

NewCmdInit returns "kubeadm init" command. NB. initOptions is exposed as parameter for allowing unit testing of

the newInitOptions method, that implements all the command options validation logic

func NewCmdJoin

func NewCmdJoin(out io.Writer, joinOptions *joinOptions) *cobra.Command

NewCmdJoin returns "kubeadm join" command. NB. joinOptions is exposed as parameter for allowing unit testing of

the newJoinData method, that implements all the command options validation logic

func NewCmdReset

func NewCmdReset(in io.Reader, out io.Writer) *cobra.Command

NewCmdReset returns the "kubeadm reset" command

func NewCmdToken

func NewCmdToken(out io.Writer, errW io.Writer) *cobra.Command

NewCmdToken returns cobra.Command for token management

func NewCmdTokenGenerate

func NewCmdTokenGenerate(out io.Writer) *cobra.Command

NewCmdTokenGenerate returns cobra.Command to generate new token

func NewCmdVersion

func NewCmdVersion(out io.Writer) *cobra.Command

NewCmdVersion provides the version information of kubeadm.

func NewKubeadmCommand

func NewKubeadmCommand(in io.Reader, out, err io.Writer) *cobra.Command

NewKubeadmCommand returns cobra.Command to run kubeadm command

func RunCompletion added in v1.6.0

func RunCompletion(out io.Writer, boilerPlate string, cmd *cobra.Command, args []string) error

RunCompletion checks given arguments and executes command

func RunConfigView added in v1.8.0

func RunConfigView(out io.Writer, client clientset.Interface) error

RunConfigView gets the configuration persisted in the cluster

func RunCreateToken added in v1.6.0

func RunCreateToken(out io.Writer, client clientset.Interface, cfgPath string, cfg *kubeadmapiv1beta1.InitConfiguration, printJoinCommand bool, kubeConfigFile string) error

RunCreateToken generates a new bootstrap token and stores it as a secret on the server.

func RunDeleteToken added in v1.6.0

func RunDeleteToken(out io.Writer, client clientset.Interface, tokenIDOrToken string) error

RunDeleteToken removes a bootstrap token from the server.

func RunGenerateToken

func RunGenerateToken(out io.Writer) error

RunGenerateToken just generates a random token for the user

func RunListTokens added in v1.6.0

func RunListTokens(out io.Writer, errW io.Writer, client clientset.Interface) error

RunListTokens lists details on all existing bootstrap tokens on the server.

func RunVersion

func RunVersion(out io.Writer, cmd *cobra.Command) error

RunVersion provides the version information of kubeadm in format depending on arguments specified in cobra.Command.

Types

type ImagesList added in v1.11.0

type ImagesList struct {
	// contains filtered or unexported fields
}

ImagesList defines the struct used for "kubeadm config images list"

func NewImagesList added in v1.11.0

func NewImagesList(cfgPath string, cfg *kubeadmapiv1beta1.InitConfiguration) (*ImagesList, error)

NewImagesList returns the underlying struct for the "kubeadm config images list" command

func (*ImagesList) Run added in v1.11.0

func (i *ImagesList) Run(out io.Writer) error

Run runs the images command and writes the result to the io.Writer passed in

type ImagesPull added in v1.11.0

type ImagesPull struct {
	// contains filtered or unexported fields
}

ImagesPull is the struct used to hold information relating to image pulling

func NewImagesPull added in v1.11.0

func NewImagesPull(runtime utilruntime.ContainerRuntime, images []string) *ImagesPull

NewImagesPull initializes and returns the `kubeadm config images pull` command

func (*ImagesPull) PullAll added in v1.11.0

func (ip *ImagesPull) PullAll() error

PullAll pulls all images that the ImagesPull knows about

type Reset

type Reset struct {
	// contains filtered or unexported fields
}

Reset defines struct used for kubeadm reset command

func NewReset

func NewReset(in io.Reader, ignorePreflightErrors sets.String, forceReset bool, certsDir, criSocketPath string) (*Reset, error)

NewReset instantiate Reset struct

func (*Reset) Run

func (r *Reset) Run(out io.Writer, client clientset.Interface, cfg *kubeadmapi.InitConfiguration) error

Run reverts any changes made to this host by "kubeadm init" or "kubeadm join".

type Version added in v1.7.0

type Version struct {
	ClientVersion *apimachineryversion.Info `json:"clientVersion"`
}

Version provides the version information of kubeadm.

Directories

Path Synopsis
Package options provide a central point for defining flags for kubeadm cobra commands, no matter if hard coded commands or autogenerated command for phases.
Package options provide a central point for defining flags for kubeadm cobra commands, no matter if hard coded commands or autogenerated command for phases.
workflow
Package workflow implements a workflow manager to be used for implementing composable kubeadm workflows.
Package workflow implements a workflow manager to be used for implementing composable kubeadm workflows.

Jump to

Keyboard shortcuts

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