cmd

package
v0.0.0-...-b25b198 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package cmd defines commands for tkg-cli

Index

Constants

View Source
const (
	// ClusterRoleNone defines cluster role none
	ClusterRoleNone = "<none>"
	// Whilespace defines whitespace
	Whilespace = " "
	// TableSeparator defines table separator
	TableSeparator = "  "
	// MessageLengthLimit defines limit on the length of the message displayed
	MessageLengthLimit = 100
	// GroupItemLimit defines limit on number of groups displayed
	GroupItemLimit = 2
)
View Source
const Indentation = `  `

Indentation defines an indent

Variables

View Source
var InitCmd = &cobra.Command{
	Use:   "init",
	Short: "Create a Tanzu Kubernetes Grid management cluster",
	Long: LongDesc(`
			Create a Tanzu Kubernetes Grid management cluster including initializing it with Cluster API components
			appropriate for the target infrastructure.
		`),

	Example: Examples(`
		# Create a management cluster on AWS infrastructure, initializing it with
		# components required to create workload clusters through it on the same infrastructure
		# by bootstrapping through a self-provisioned bootstrap cluster.
		tkg init --infrastructure=aws

		# Create a management cluster, but on vSphere infrastructure instead,
		# using cluster plan 'prod'.
		tkg init --infrastructure=vsphere --plan prod

		# Launch an interactive UI to configure the settings necessary to create a
		# management cluster on vSphere infrastructure.
		tkg init --infrastructure=vsphere --ui

		# Create a management cluster on AWS infrastructure by using an existing
		# bootstrapper cluster. The current kube context should point to that
		# of the existing bootstrap cluster.
		tkg init --use-existing-bootstrap-cluster --infrastructure=aws

		# Create a management cluster on AWS using a particular plan using 'i3.large' instance size
		# for control plane nodes, and 'm5.large' size for worker nodes.
		tkg init --infrastructure=aws --controlplane-size i3.large --worker-size m5.large -p prod

		Note: The current cluster pointed to by the kubeconfig file will only
		be used to bootstrap the creation of the management cluster if
		--use-existing-bootstrap-cluster argument is supplied

		[+] : instance size options available for vSphere are as follows:
		vSphere: [extra-large,large,medium,small]


		[*] : VMware's Customer Experience Improvement Program ("CEIP") provides VMware with information that enables
		VMware to improve its products and services and fix problems. By choosing to participate in CEIP, you agree that
		VMware may collect technical information about your use of VMware products and services on a regular basis. This
		information does not personally identify you. Set this flag to false if you choose not to participate in the program.
		If this flag is not set, then the value from the cluster-config is used to determine the CEIP participation status.
  		CEIP participation is true by default.`),

	Run: func(cmd *cobra.Command, args []string) {
		log.UnsetStdoutStderr()
		displayLogFileLocation()
		err := runInit()
		verifyCommandError(err)
	},
}

InitCmd defines init command

View Source
var RootCmd = &cobra.Command{
	Use:   "tkg",
	Short: "tkg : a tool for provisioning management or Tanzu Kubernetes Grid clusters",
	Long: LongDesc(`
		VMware Tanzu Kubernetes Grid

		Consistently deploy and operate upstream Kubernetes across a variety of infrastructure providers.

		Documentation: https://docs.vmware.com/en/VMware-Tanzu-Kubernetes-Grid/index.html
		`),
}

RootCmd defines root command

View Source
var Warningvsphere7WithPacific = `` /* 550-byte string literal not displayed */

Warningvsphere7WithPacific ...

View Source
var Warningvsphere7WithoutPacific = `` /* 598-byte string literal not displayed */

Warningvsphere7WithoutPacific ...

Functions

func Examples

func Examples(s string) string

Examples normalizes a command's examples to follow the conventions.

func Execute

func Execute()

Execute executes root command

func LongDesc

func LongDesc(s string) string

LongDesc normalizes a command's long description to follow the conventions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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