cmd

package
v1.10.0-alpha.2...-72cec4d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddInitConfigFlags

func AddInitConfigFlags(flagSet *flag.FlagSet, cfg *kubeadmapiext.MasterConfiguration, featureGatesString *string)

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

func AddInitOtherFlags

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

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

func AddJoinConfigFlags

func AddJoinConfigFlags(flagSet *flag.FlagSet, cfg *kubeadmapiext.NodeConfiguration, featureGatesString *string)

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

func AddJoinOtherFlags

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

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

func NewCmdCompletion

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

NewCmdCompletion return command for executing "kubeadm completion" command

func NewCmdConfig

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

NewCmdConfig returns cobra.Command for "kubeadm config" 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(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(_ io.Reader, out, err io.Writer) *cobra.Command

NewKubeadmCommand return 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, token string, tokenDuration time.Duration, usages []string, extraGroups []string, description string, 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 Init

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

Init defines struct used by "kubeadm init" command

func NewInit

func NewInit(cfgPath string, cfg *kubeadmapi.MasterConfiguration, ignorePreflightErrors sets.String, skipTokenPrint, dryRun bool, criSocket string) (*Init, error)

NewInit validates given arguments and instantiates Init struct with provided information.

func (*Init) Run

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

Run executes master node provisioning, including certificates, needed static pod manifests, etc.

func (*Init) Validate

func (i *Init) Validate(cmd *cobra.Command) error

Validate validates configuration passed to "kubeadm init"

type Join

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

Join defines struct used by kubeadm join command

func NewJoin

func NewJoin(cfgPath string, args []string, cfg *kubeadmapi.NodeConfiguration, ignorePreflightErrors sets.String, criSocket string) (*Join, error)

NewJoin instantiates Join struct with given arguments

func (*Join) Run

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

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

func (*Join) Validate

func (j *Join) Validate(cmd *cobra.Command) error

Validate validates mixed arguments passed to cobra.Command

type Reset

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

Reset defines struct used for kubeadm reset command

func NewReset

func NewReset(ignorePreflightErrors sets.String, certsDir, criSocketPath string) (*Reset, error)

NewReset instantiate Reset struct

func (*Reset) Run

func (r *Reset) Run(out io.Writer) 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

Jump to

Keyboard shortcuts

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