cmd

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: Apache-2.0 Imports: 70 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddImagesCommonConfigFlags

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 AddImagesPullFlags

func AddImagesPullFlags(flagSet *flag.FlagSet, cfg *kubeadmapiv1beta1.InitConfiguration)

AddImagesPullFlags adds flags related to the `kubeadm config images pull` command

func AddInitConfigFlags

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

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

func AddInitOtherFlags

func AddInitOtherFlags(flagSet *flag.FlagSet, cfgPath *string, skipTokenPrint, dryRun *bool, ignorePreflightErrors *[]string)

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

func AddJoinBootstrapTokenDiscoveryFlags

func AddJoinBootstrapTokenDiscoveryFlags(flagSet *flag.FlagSet, btd *kubeadmapiv1beta1.BootstrapTokenDiscovery)

AddJoinBootstrapTokenDiscoveryFlags adds bootstrap token specific discovery flags to the specified flagset

func AddJoinConfigFlags

func AddJoinConfigFlags(flagSet *flag.FlagSet, cfg *kubeadmapiv1beta1.JoinConfiguration, featureGatesString *string, token *string)

AddJoinConfigFlags adds join flags bound to the config to the specified flagset

func AddJoinFileDiscoveryFlags

func AddJoinFileDiscoveryFlags(flagSet *flag.FlagSet, fd *kubeadmapiv1beta1.FileDiscovery)

AddJoinFileDiscoveryFlags adds file discovery flags to the specified flagset

func AddJoinOtherFlags

func AddJoinOtherFlags(flagSet *flag.FlagSet, cfgPath *string, ignorePreflightErrors *[]string)

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

func AddKubeadmOtherFlags

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

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

func GetSupportedShells

func GetSupportedShells() []string

GetSupportedShells returns a list of supported shells

func NewCmdCompletion

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

NewCmdCompletion returns the "kubeadm completion" command

func NewCmdConfig

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

NewCmdConfig returns cobra.Command for "kubeadm config" command

func NewCmdConfigImages

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

NewCmdConfigImages returns the "kubeadm config images" command

func NewCmdConfigImagesList

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

NewCmdConfigImagesList returns the "kubeadm config images list" command

func NewCmdConfigImagesPull

func NewCmdConfigImagesPull() *cobra.Command

NewCmdConfigImagesPull returns the `kubeadm config images pull` command

func NewCmdConfigMigrate

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

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

func NewCmdConfigPrint

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

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

func NewCmdConfigPrintDefault

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

NewCmdConfigPrintDefault returns cobra.Command for "kubeadm config print-default" command

func NewCmdConfigPrintInitDefaults

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

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

func NewCmdConfigPrintJoinDefaults

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

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

func NewCmdConfigUpload

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

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

func NewCmdConfigUploadFromFile

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

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

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

func NewCmdConfigView

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) *cobra.Command

NewCmdInit returns "kubeadm init" command.

func NewCmdJoin

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

NewCmdJoin returns "kubeadm join" command.

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

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

RunCompletion checks given arguments and executes command

func RunConfigView

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

RunConfigView gets the configuration persisted in the cluster

func RunCreateToken

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

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

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

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

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

func NewImagesList

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

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

func (*ImagesList) Run

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

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

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

func NewImagesPull

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

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

func (*ImagesPull) PullAll

func (ip *ImagesPull) PullAll() error

PullAll pulls all images that the ImagesPull knows about

type Join

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

Join defines struct used by kubeadm join command

func NewJoin

func NewJoin(cfgPath string, defaultcfg *kubeadmapiv1beta1.JoinConfiguration, ignorePreflightErrors sets.String) (*Join, error)

NewJoin instantiates Join struct with given arguments

func NewValidJoin

func NewValidJoin(flagSet *flag.FlagSet, cfg *kubeadmapiv1beta1.JoinConfiguration, cfgPath, featureGatesString string, ignorePreflightErrors []string) (*Join, error)

NewValidJoin validates the command line that are passed to the cobra command

func (*Join) BootstrapKubelet

func (j *Join) BootstrapKubelet(tlsBootstrapCfg *clientcmdapi.Config) error

BootstrapKubelet executes the kubelet TLS bootstrap process. This process is executed by the kubelet and completes with the node joining the cluster with a dedicates set of credentials as required by the node authorizer

func (*Join) CheckIfReadyForAdditionalControlPlane

func (j *Join) CheckIfReadyForAdditionalControlPlane(initConfiguration *kubeadmapi.InitConfiguration) error

CheckIfReadyForAdditionalControlPlane ensures that the cluster is in a state that supports joining an additional control plane instance and if the node is ready to join

func (*Join) FetchInitConfiguration

func (j *Join) FetchInitConfiguration(tlsBootstrapCfg *clientcmdapi.Config) (*kubeadmapi.InitConfiguration, error)

FetchInitConfiguration reads the cluster configuration from the kubeadm-admin configMap,

func (*Join) PostInstallControlPlane

func (j *Join) PostInstallControlPlane(initConfiguration *kubeadmapi.InitConfiguration) error

PostInstallControlPlane marks the new node as master and update the cluster status with information about current node

func (*Join) PrepareForHostingControlPlane

func (j *Join) PrepareForHostingControlPlane(initConfiguration *kubeadmapi.InitConfiguration) error

PrepareForHostingControlPlane makes all preparation activities require for a node hosting a new control plane instance

func (*Join) Run

func (j *Join) Run(out io.Writer) error

Run executes worker node provisioning and tries to join an existing cluster.

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

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

type Version

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

Version provides the version information of kubeadm.

Directories

Path Synopsis
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