Documentation
¶
Index ¶
- func AddImagesCommonConfigFlags(flagSet *flag.FlagSet, cfg *kubeadmapiv1alpha3.InitConfiguration, ...)
- func AddImagesPullFlags(flagSet *flag.FlagSet, cfg *kubeadmapiv1alpha3.InitConfiguration)
- func AddInitConfigFlags(flagSet *flag.FlagSet, cfg *kubeadmapiv1alpha3.InitConfiguration, ...)
- func AddInitOtherFlags(flagSet *flag.FlagSet, cfgPath *string, skipTokenPrint, dryRun *bool, ...)
- func AddJoinConfigFlags(flagSet *flag.FlagSet, cfg *kubeadmapiv1alpha3.JoinConfiguration, ...)
- func AddJoinOtherFlags(flagSet *flag.FlagSet, cfgPath *string, ignorePreflightErrors *[]string)
- func AddKubeadmOtherFlags(flagSet *pflag.FlagSet, rootfsPath *string)
- func GetSupportedShells() []string
- func NewCmdCompletion(out io.Writer, boilerPlate string) *cobra.Command
- func NewCmdConfig(out io.Writer) *cobra.Command
- func NewCmdConfigImages(out io.Writer) *cobra.Command
- func NewCmdConfigImagesList(out io.Writer, mockK8sVersion *string) *cobra.Command
- func NewCmdConfigImagesPull() *cobra.Command
- func NewCmdConfigMigrate(out io.Writer) *cobra.Command
- func NewCmdConfigPrintDefault(out io.Writer) *cobra.Command
- func NewCmdConfigUpload(out io.Writer, kubeConfigFile *string) *cobra.Command
- func NewCmdConfigUploadFromFile(out io.Writer, kubeConfigFile *string) *cobra.Command
- func NewCmdConfigUploadFromFlags(out io.Writer, kubeConfigFile *string) *cobra.Command
- func NewCmdConfigView(out io.Writer, kubeConfigFile *string) *cobra.Command
- func NewCmdInit(out io.Writer) *cobra.Command
- func NewCmdJoin(out io.Writer) *cobra.Command
- func NewCmdReset(in io.Reader, out io.Writer) *cobra.Command
- func NewCmdToken(out io.Writer, errW io.Writer) *cobra.Command
- func NewCmdTokenGenerate(out io.Writer) *cobra.Command
- func NewCmdVersion(out io.Writer) *cobra.Command
- func NewKubeadmCommand(in io.Reader, out, err io.Writer) *cobra.Command
- func RunCompletion(out io.Writer, boilerPlate string, cmd *cobra.Command, args []string) error
- func RunConfigView(out io.Writer, client clientset.Interface) error
- func RunCreateToken(out io.Writer, client clientset.Interface, cfgPath string, ...) error
- func RunDeleteToken(out io.Writer, client clientset.Interface, tokenIDOrToken string) error
- func RunGenerateToken(out io.Writer) error
- func RunListTokens(out io.Writer, errW io.Writer, client clientset.Interface) error
- func RunVersion(out io.Writer, cmd *cobra.Command) error
- type ImagesList
- type ImagesPull
- type Init
- type Join
- func (j *Join) BootstrapKubelet(tlsBootstrapCfg *clientcmdapi.Config) error
- func (j *Join) CheckIfReadyForAdditionalControlPlane(initConfiguration *kubeadmapi.InitConfiguration) error
- func (j *Join) FetchInitConfiguration(tlsBootstrapCfg *clientcmdapi.Config) (*kubeadmapi.InitConfiguration, error)
- func (j *Join) PostInstallControlPlane(initConfiguration *kubeadmapi.InitConfiguration) error
- func (j *Join) PrepareForHostingControlPlane(initConfiguration *kubeadmapi.InitConfiguration) error
- func (j *Join) Run(out io.Writer) error
- type Reset
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddImagesCommonConfigFlags ¶ added in v1.11.7
func AddImagesCommonConfigFlags(flagSet *flag.FlagSet, cfg *kubeadmapiv1alpha3.InitConfiguration, cfgPath *string, featureGatesString *string)
AddImagesCommonConfigFlags adds the flags that configure kubeadm (and affect the images kubeadm will use)
func AddImagesPullFlags ¶ added in v1.11.7
func AddImagesPullFlags(flagSet *flag.FlagSet, cfg *kubeadmapiv1alpha3.InitConfiguration)
AddImagesPullFlags adds flags related to the `kubeadm config images pull` command
func AddInitConfigFlags ¶ added in v1.8.0
func AddInitConfigFlags(flagSet *flag.FlagSet, cfg *kubeadmapiv1alpha3.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, cfgPath *string, skipTokenPrint, dryRun *bool, ignorePreflightErrors *[]string)
AddInitOtherFlags adds init flags that are not bound to a configuration file to the given flagset
func AddJoinConfigFlags ¶ added in v1.9.0
func AddJoinConfigFlags(flagSet *flag.FlagSet, cfg *kubeadmapiv1alpha3.JoinConfiguration, featureGatesString *string)
AddJoinConfigFlags adds join flags bound to the config to the specified flagset
func AddJoinOtherFlags ¶ added in v1.9.0
AddJoinOtherFlags adds join flags that are not bound to a configuration file to the given flagset
func AddKubeadmOtherFlags ¶ added in v1.12.6
AddKubeadmOtherFlags adds flags that are not bound to a configuration file to the given flagset
func GetSupportedShells ¶ added in v1.11.7
func GetSupportedShells() []string
GetSupportedShells returns a list of supported shells
func NewCmdCompletion ¶ added in v1.6.0
NewCmdCompletion returns the "kubeadm completion" command
func NewCmdConfig ¶ added in v1.8.0
NewCmdConfig returns cobra.Command for "kubeadm config" command
func NewCmdConfigImages ¶ added in v1.11.7
NewCmdConfigImages returns the "kubeadm config images" command
func NewCmdConfigImagesList ¶ added in v1.11.7
NewCmdConfigImagesList returns the "kubeadm config images list" command
func NewCmdConfigImagesPull ¶ added in v1.11.7
NewCmdConfigImagesPull returns the `kubeadm config images pull` command
func NewCmdConfigMigrate ¶ added in v1.11.7
NewCmdConfigMigrate returns cobra.Command for "kubeadm config migrate" command
func NewCmdConfigPrintDefault ¶ added in v1.11.7
NewCmdConfigPrintDefault returns cobra.Command for "kubeadm config print-default" command
func NewCmdConfigUpload ¶ added in v1.8.0
NewCmdConfigUpload returns cobra.Command for "kubeadm config upload" command
func NewCmdConfigUploadFromFile ¶ added in v1.8.0
NewCmdConfigUploadFromFile verifies given kubernetes config file and returns cobra.Command for "kubeadm config upload from-file" command
func NewCmdConfigUploadFromFlags ¶ added in v1.8.0
NewCmdConfigUploadFromFlags returns cobra.Command for "kubeadm config upload from-flags" command
func NewCmdConfigView ¶ added in v1.8.0
NewCmdConfigView returns cobra.Command for "kubeadm config view" command
func NewCmdInit ¶
NewCmdInit returns "kubeadm init" command.
func NewCmdJoin ¶
NewCmdJoin returns "kubeadm join" command.
func NewCmdReset ¶
NewCmdReset returns the "kubeadm reset" command
func NewCmdToken ¶
NewCmdToken returns cobra.Command for token management
func NewCmdTokenGenerate ¶
NewCmdTokenGenerate returns cobra.Command to generate new token
func NewCmdVersion ¶
NewCmdVersion provides the version information of kubeadm.
func NewKubeadmCommand ¶
NewKubeadmCommand returns cobra.Command to run kubeadm command
func RunCompletion ¶ added in v1.6.0
RunCompletion checks given arguments and executes command
func RunConfigView ¶ added in v1.8.0
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 *kubeadmapiv1alpha3.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
RunDeleteToken removes a bootstrap token from the server.
func RunGenerateToken ¶
RunGenerateToken just generates a random token for the user
func RunListTokens ¶ added in v1.6.0
RunListTokens lists details on all existing bootstrap tokens on the server.
Types ¶
type ImagesList ¶ added in v1.11.7
type ImagesList struct {
// contains filtered or unexported fields
}
ImagesList defines the struct used for "kubeadm config images list"
func NewImagesList ¶ added in v1.11.7
func NewImagesList(cfgPath string, cfg *kubeadmapiv1alpha3.InitConfiguration) (*ImagesList, error)
NewImagesList returns the underlying struct for the "kubeadm config images list" command
type ImagesPull ¶ added in v1.11.7
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.7
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.7
func (ip *ImagesPull) PullAll() error
PullAll pulls all images that the ImagesPull knows about
type Init ¶
type Init struct {
// contains filtered or unexported fields
}
Init defines struct used by "kubeadm init" command
func NewInit ¶
func NewInit(cfgPath string, externalcfg *kubeadmapiv1alpha3.InitConfiguration, ignorePreflightErrors sets.String, skipTokenPrint, dryRun bool) (*Init, error)
NewInit validates given arguments and instantiates Init struct with provided information.
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, defaultcfg *kubeadmapiv1alpha3.JoinConfiguration, ignorePreflightErrors sets.String) (*Join, error)
NewJoin instantiates Join struct with given arguments
func NewValidJoin ¶ added in v1.11.7
func NewValidJoin(flagSet *flag.FlagSet, cfg *kubeadmapiv1alpha3.JoinConfiguration, args []string, cfgPath, featureGatesString string, ignorePreflightErrors []string) (*Join, error)
NewValidJoin validates the command line that are passed to the cobra command
func (*Join) BootstrapKubelet ¶ added in v1.12.6
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 ¶ added in v1.12.6
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 ¶ added in v1.12.6
func (j *Join) FetchInitConfiguration(tlsBootstrapCfg *clientcmdapi.Config) (*kubeadmapi.InitConfiguration, error)
FetchInitConfiguration reads the cluster configuration from the kubeadm-admin configMap,
func (*Join) PostInstallControlPlane ¶ added in v1.12.6
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 ¶ added in v1.12.6
func (j *Join) PrepareForHostingControlPlane(initConfiguration *kubeadmapi.InitConfiguration) error
PrepareForHostingControlPlane makes all preparation activities require for a node hosting a new control plane instance
type Reset ¶
type Reset struct {
// contains filtered or unexported fields
}
Reset defines struct used for kubeadm reset command
type Version ¶ added in v1.7.0
type Version struct {
ClientVersion *apimachineryversion.Info `json:"clientVersion"`
}
Version provides the version information of kubeadm.