package cmd
import "k8s.io/kubernetes/pkg/kubectl/cmd"
Index ¶
- func DeleteResult(r *resource.Result, out io.Writer, ignoreNotFound bool, shortOutput bool, mapper meta.RESTMapper) error
- func DescribeMatchingResources(mapper meta.RESTMapper, typer runtime.ObjectTyper, f *cmdutil.Factory, namespace, rsrc, prefix string, out io.Writer, originalError error) error
- func NewCmdAnnotate(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdApiVersions(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdApply(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdAttach(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) *cobra.Command
- func NewCmdAutoscale(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdClusterInfo(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdCreate(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdDelete(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdDescribe(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdEdit(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdExec(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) *cobra.Command
- func NewCmdExposeService(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdGet(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdLabel(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdLog(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdNamespace(out io.Writer) *cobra.Command
- func NewCmdPatch(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdPortForward(f *cmdutil.Factory) *cobra.Command
- func NewCmdProxy(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdReplace(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdRollingUpdate(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdRun(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer) *cobra.Command
- func NewCmdScale(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdStop(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewCmdVersion(f *cmdutil.Factory, out io.Writer) *cobra.Command
- func NewKubectlCommand(f *cmdutil.Factory, in io.Reader, out, err io.Writer) *cobra.Command
- func ReapResult(r *resource.Result, f *cmdutil.Factory, out io.Writer, isDefaultDelete, ignoreNotFound bool, timeout time.Duration, gracePeriod int, shortOutput bool, mapper meta.RESTMapper) error
- func Run(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer, cmd *cobra.Command, args []string) error
- func RunApiVersions(f *cmdutil.Factory, w io.Writer) error
- func RunApply(f *cmdutil.Factory, cmd *cobra.Command, out io.Writer, options *ApplyOptions) error
- func RunAutoscale(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, filenames []string) error
- func RunClusterInfo(factory *cmdutil.Factory, out io.Writer, cmd *cobra.Command) error
- func RunCreate(f *cmdutil.Factory, cmd *cobra.Command, out io.Writer, options *CreateOptions) error
- func RunDelete(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *DeleteOptions) error
- func RunDescribe(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *DescribeOptions) error
- func RunEdit(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, filenames []string) error
- func RunExpose(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *ExposeOptions) error
- func RunGet(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *GetOptions) error
- func RunLabel(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *LabelOptions) error
- func RunLog(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, p *logParams) error
- func RunPatch(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, shortOutput bool, options *PatchOptions) error
- func RunPortForward(f *cmdutil.Factory, cmd *cobra.Command, args []string, fw portForwarder) error
- func RunProxy(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command) error
- func RunReplace(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *ReplaceOptions) error
- func RunRollingUpdate(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *RollingUpdateOptions) error
- func RunScale(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, shortOutput bool, options *ScaleOptions) error
- func RunStop(f *cmdutil.Factory, cmd *cobra.Command, args []string, out io.Writer, options *StopOptions) error
- func RunVersion(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command) error
- func ValidateArgs(cmd *cobra.Command, args []string) error
- type AnnotateOptions
- func (o *AnnotateOptions) Complete(f *cmdutil.Factory, args []string) (err error)
- func (o AnnotateOptions) RunAnnotate() error
- func (o AnnotateOptions) Validate(args []string) error
- type ApplyOptions
- type AttachOptions
- func (p *AttachOptions) Complete(f *cmdutil.Factory, cmd *cobra.Command, argsIn []string) error
- func (p *AttachOptions) GetContainerName(pod *api.Pod) string
- func (p *AttachOptions) Run() error
- func (p *AttachOptions) Validate() error
- type CreateOptions
- type DefaultRemoteAttach
- type DefaultRemoteExecutor
- type DeleteOptions
- type DescribeOptions
- type ExecOptions
- func (p *ExecOptions) Complete(f *cmdutil.Factory, cmd *cobra.Command, argsIn []string) error
- func (p *ExecOptions) Run() error
- func (p *ExecOptions) Validate() error
- type ExposeOptions
- type GetOptions
- type LabelOptions
- type PatchOptions
- type RemoteAttach
- type RemoteExecutor
- type ReplaceOptions
- type RollingUpdateOptions
- type ScaleOptions
- type StopOptions
Functions ¶
func DeleteResult ¶
func DeleteResult(r *resource.Result, out io.Writer, ignoreNotFound bool, shortOutput bool, mapper meta.RESTMapper) error
func DescribeMatchingResources ¶
func DescribeMatchingResources(mapper meta.RESTMapper, typer runtime.ObjectTyper, f *cmdutil.Factory, namespace, rsrc, prefix string, out io.Writer, originalError error) error
func NewCmdAnnotate ¶
func NewCmdApiVersions ¶
func NewCmdApply ¶
func NewCmdAttach ¶
func NewCmdAutoscale ¶
TODO: support autoscale for deployments
func NewCmdClusterInfo ¶
func NewCmdCreate ¶
func NewCmdDelete ¶
func NewCmdDescribe ¶
func NewCmdEdit ¶
func NewCmdExec ¶
func NewCmdExposeService ¶
func NewCmdGet ¶
NewCmdGet creates a command object for the generic "get" action, which retrieves one or more resources from a server.
func NewCmdLabel ¶
func NewCmdLog ¶
NewCmdLog creates a new pod log command
func NewCmdNamespace ¶
TODO remove once people have been given enough time to notice
func NewCmdPatch ¶
func NewCmdPortForward ¶
func NewCmdProxy ¶
func NewCmdReplace ¶
func NewCmdRollingUpdate ¶
func NewCmdRun ¶
func NewCmdScale ¶
NewCmdScale returns a cobra command with the appropriate configuration and flags to run scale
func NewCmdStop ¶
func NewCmdVersion ¶
func NewKubectlCommand ¶
NewKubectlCommand creates the `kubectl` command and its nested children.
func ReapResult ¶
func ReapResult(r *resource.Result, f *cmdutil.Factory, out io.Writer, isDefaultDelete, ignoreNotFound bool, timeout time.Duration, gracePeriod int, shortOutput bool, mapper meta.RESTMapper) error
func Run ¶
func Run(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer, cmd *cobra.Command, args []string) error
func RunApiVersions ¶
func RunApply ¶
func RunAutoscale ¶
func RunAutoscale(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, filenames []string) error
func RunClusterInfo ¶
func RunCreate ¶
func RunDelete ¶
func RunDelete(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *DeleteOptions) error
func RunDescribe ¶
func RunDescribe(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *DescribeOptions) error
func RunEdit ¶
func RunEdit(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, filenames []string) error
func RunExpose ¶
func RunExpose(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *ExposeOptions) error
func RunGet ¶
func RunGet(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *GetOptions) error
RunGet implements the generic Get command TODO: convert all direct flag accessors to a struct and pass that instead of cmd
func RunLabel ¶
func RunLabel(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *LabelOptions) error
func RunLog ¶
func RunLog(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, p *logParams) error
RunLog retrieves a pod log
func RunPatch ¶
func RunPatch(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, shortOutput bool, options *PatchOptions) error
func RunPortForward ¶
func RunProxy ¶
func RunReplace ¶
func RunReplace(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *ReplaceOptions) error
func RunRollingUpdate ¶
func RunRollingUpdate(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, options *RollingUpdateOptions) error
func RunScale ¶
func RunScale(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []string, shortOutput bool, options *ScaleOptions) error
RunScale executes the scaling
func RunStop ¶
func RunStop(f *cmdutil.Factory, cmd *cobra.Command, args []string, out io.Writer, options *StopOptions) error
func RunVersion ¶
func ValidateArgs ¶
Types ¶
type AnnotateOptions ¶
type AnnotateOptions struct {
// contains filtered or unexported fields
}
AnnotateOptions have the data required to perform the annotate operation
func (*AnnotateOptions) Complete ¶
func (o *AnnotateOptions) Complete(f *cmdutil.Factory, args []string) (err error)
Complete adapts from the command line args and factory to the data required.
func (AnnotateOptions) RunAnnotate ¶
func (o AnnotateOptions) RunAnnotate() error
RunAnnotate does the work
func (AnnotateOptions) Validate ¶
func (o AnnotateOptions) Validate(args []string) error
Validate checks to the AnnotateOptions to see if there is sufficient information run the command.
type ApplyOptions ¶
type ApplyOptions struct { Filenames []string }
ApplyOptions stores cmd.Flag values for apply. As new fields are added, add them here instead of referencing the cmd.Flags()
type AttachOptions ¶
type AttachOptions struct { Namespace string PodName string ContainerName string Stdin bool TTY bool In io.Reader Out io.Writer Err io.Writer Attach RemoteAttach Client *client.Client Config *client.Config }
AttachOptions declare the arguments accepted by the Exec command
func (*AttachOptions) Complete ¶
Complete verifies command line arguments and loads data from the command environment
func (*AttachOptions) GetContainerName ¶
func (p *AttachOptions) GetContainerName(pod *api.Pod) string
GetContainerName returns the name of the container to attach to, with a fallback.
func (*AttachOptions) Run ¶
func (p *AttachOptions) Run() error
Run executes a validated remote execution against a pod.
func (*AttachOptions) Validate ¶
func (p *AttachOptions) Validate() error
Validate checks that the provided attach options are specified.
type CreateOptions ¶
type CreateOptions struct { Filenames []string }
CreateOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type DefaultRemoteAttach ¶
type DefaultRemoteAttach struct{}
DefaultRemoteAttach is the standard implementation of attaching
func (*DefaultRemoteAttach) Attach ¶
func (*DefaultRemoteAttach) Attach(method string, url *url.URL, config *client.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool) error
type DefaultRemoteExecutor ¶
type DefaultRemoteExecutor struct{}
DefaultRemoteExecutor is the standard implementation of remote command execution
func (*DefaultRemoteExecutor) Execute ¶
func (*DefaultRemoteExecutor) Execute(method string, url *url.URL, config *client.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool) error
type DeleteOptions ¶
type DeleteOptions struct { Filenames []string }
DeleteOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type DescribeOptions ¶
type DescribeOptions struct { Filenames []string }
DescribeOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type ExecOptions ¶
type ExecOptions struct { Namespace string PodName string ContainerName string Stdin bool TTY bool Command []string In io.Reader Out io.Writer Err io.Writer Executor RemoteExecutor Client *client.Client Config *client.Config }
ExecOptions declare the arguments accepted by the Exec command
func (*ExecOptions) Complete ¶
Complete verifies command line arguments and loads data from the command environment
func (*ExecOptions) Run ¶
func (p *ExecOptions) Run() error
Run executes a validated remote execution against a pod.
func (*ExecOptions) Validate ¶
func (p *ExecOptions) Validate() error
Validate checks that the provided exec options are specified.
type ExposeOptions ¶
type ExposeOptions struct { Filenames []string }
ExposeOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type GetOptions ¶
type GetOptions struct { Filenames []string }
GetOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type LabelOptions ¶
type LabelOptions struct { Filenames []string }
LabelOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type PatchOptions ¶
type PatchOptions struct { Filenames []string }
PatchOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type RemoteAttach ¶
type RemoteAttach interface { Attach(method string, url *url.URL, config *client.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool) error }
RemoteAttach defines the interface accepted by the Attach command - provided for test stubbing
type RemoteExecutor ¶
type RemoteExecutor interface { Execute(method string, url *url.URL, config *client.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool) error }
RemoteExecutor defines the interface accepted by the Exec command - provided for test stubbing
type ReplaceOptions ¶
type ReplaceOptions struct { Filenames []string }
ReplaceOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type RollingUpdateOptions ¶
type RollingUpdateOptions struct { Filenames []string }
RollingUpdateOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type ScaleOptions ¶
type ScaleOptions struct { Filenames []string }
ScaleOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
type StopOptions ¶
type StopOptions struct { Filenames []string }
StopOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()
Source Files ¶
annotate.go apiversions.go apply.go attach.go autoscale.go clusterinfo.go cmd.go create.go delete.go describe.go edit.go exec.go expose.go get.go label.go log.go namespace.go patch.go portforward.go proxy.go replace.go rollingupdate.go run.go scale.go stop.go version.go
Directories ¶
Path | Synopsis |
---|---|
pkg/kubectl/cmd/config | |
pkg/kubectl/cmd/util | |
pkg/kubectl/cmd/util/editor | |
pkg/kubectl/cmd/util/jsonmerge |
- Version
- v1.1.2
- Published
- Nov 19, 2015
- Platform
- js/wasm
- Imports
- 46 packages
- Last checked
- 10 seconds ago –
Tools for package owners.