Documentation
¶
Index ¶
- Constants
- func DefaultConsumeRequest(request *rest.Request, out io.Writer) error
- func NewCmdAlpha(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdAnnotate(parent string, f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdApiResources(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdApiVersions(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdApply(baseName string, f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdApplyEditLastApplied(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdApplySetLastApplied(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdApplyViewLastApplied(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdAttach(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdAutoscale(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCertificate(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCertificateApprove(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCertificateDeny(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdClusterInfo(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdClusterInfoDump(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCompletion(out io.Writer, boilerPlate string) *cobra.Command
- func NewCmdConvert(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCordon(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCp(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdDelete(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdDescribe(parent string, f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdDiff(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdDrain(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdEdit(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdExec(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdExplain(parent string, f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdExposeService(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdHelp() *cobra.Command
- func NewCmdLabel(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdLogs(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdOptions(out io.Writer) *cobra.Command
- func NewCmdPatch(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdPlugin(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdPluginList(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdPortForward(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdProxy(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdReplace(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdRollingUpdate(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdRun(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdScale(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdTaint(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdTop(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdTopNode(f cmdutil.Factory, o *TopNodeOptions, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdTopPod(f cmdutil.Factory, o *TopPodOptions, streams genericclioptions.IOStreams) *cobra.Command
- func NewCmdUncordon(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdVersion(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewDefaultKubectlCommand() *cobra.Command
- func NewDefaultKubectlCommandWithArgs(pluginHandler PluginHandler, args []string, in io.Reader, ...) *cobra.Command
- func NewKubectlCommand(in io.Reader, out, err io.Writer) *cobra.Command
- func RunCompletion(out io.Writer, boilerPlate string, cmd *cobra.Command, args []string) error
- func RunDiff(f cmdutil.Factory, diff *DiffProgram, options *DiffOptions, from, to string) error
- func RunHelp(cmd *cobra.Command, args []string)
- func RunProxy(f cmdutil.Factory, out io.Writer, cmd *cobra.Command) error
- func ScaleJob(info *resource.Info, jobsClient batchclient.JobsGetter, count uint, ...) error
- func SupportEviction(clientset kubernetes.Interface) (string, error)
- func SupportedMetricsAPIVersionAvailable(discoveredAPIGroups *metav1.APIGroupList) bool
- type AnnotateOptions
- type ApiResourcesOptions
- type ApiVersionsOptions
- type ApplyOptions
- type AttachOptions
- type AutoscaleOptions
- type CertificateOptions
- type ClusterInfoDumpOptions
- type ClusterInfoOptions
- type CommandOverrideVerifier
- type ConvertOptions
- type CopyOptions
- type DefaultRemoteAttach
- type DefaultRemoteExecutor
- type DeleteFlags
- type DeleteOptions
- func (o *DeleteOptions) Complete(f cmdutil.Factory, args []string, cmd *cobra.Command) error
- func (o *DeleteOptions) DeleteResult(r *resource.Result) error
- func (o *DeleteOptions) PrintObj(info *resource.Info)
- func (o *DeleteOptions) RunDelete() error
- func (o *DeleteOptions) Validate(cmd *cobra.Command) error
- type DescribeOptions
- type DiffOptions
- type DiffProgram
- type DiffVersion
- type Differ
- type Directory
- type Downloader
- type DrainOptions
- type ExecOptions
- type ExplainOptions
- type ExposeServiceOptions
- type HeapsterTopOptions
- type InfoObject
- type LabelOptions
- type LogsOptions
- type Object
- type PatchBuffer
- type PatchOptions
- type PathVerifier
- type PluginHandler
- type PluginListOptions
- type PortForwardOptions
- type Printer
- type RemoteAttach
- type RemoteExecutor
- type ReplaceOptions
- type RollingUpdateOptions
- type RunObject
- type RunOptions
- type ScaleOptions
- type SetLastAppliedOptions
- type StreamOptions
- type TaintOptions
- type TopNodeOptions
- type TopPodOptions
- type Version
- type VersionOptions
- type ViewLastAppliedOptions
Constants ¶
const (
EvictionKind = "Eviction"
EvictionSubresource = "pods/eviction"
)
Variables ¶
This section is empty.
Functions ¶
func DefaultConsumeRequest ¶ added in v1.12.0
func DefaultConsumeRequest(request *rest.Request, out io.Writer) error
func NewCmdAlpha ¶ added in v1.8.0
func NewCmdAlpha(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
NewCmdAlpha creates a command that acts as an alternate root command for features in alpha
func NewCmdAnnotate ¶ added in v1.1.0
func NewCmdAnnotate(parent string, f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
func NewCmdApiResources ¶ added in v1.11.0
func NewCmdApiResources(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
func NewCmdApiVersions ¶ added in v0.15.0
func NewCmdApiVersions(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
func NewCmdApply ¶ added in v1.1.1
func NewCmdApply(baseName string, f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
func NewCmdApplyEditLastApplied ¶ added in v1.7.0
func NewCmdApplyEditLastApplied(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
func NewCmdApplySetLastApplied ¶ added in v1.6.0
func NewCmdApplySetLastApplied(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
func NewCmdApplyViewLastApplied ¶ added in v1.6.0
func NewCmdApplyViewLastApplied(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
func NewCmdAttach ¶ added in v1.1.0
func NewCmdAttach(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
func NewCmdAutoscale ¶ added in v1.1.1
func NewCmdAutoscale(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
func NewCmdCertificate ¶ added in v1.5.0
func NewCmdCertificate(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
func NewCmdCertificateApprove ¶ added in v1.5.0
func NewCmdCertificateApprove(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
func NewCmdCertificateDeny ¶ added in v1.5.0
func NewCmdCertificateDeny(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
func NewCmdClusterInfo ¶ added in v0.15.0
func NewCmdClusterInfo(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
func NewCmdClusterInfoDump ¶ added in v1.3.0
func NewCmdClusterInfoDump(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
NewCmdCreateSecret groups subcommands to create various types of secrets
func NewCmdCompletion ¶ added in v1.3.0
func NewCmdCompletion(out io.Writer, boilerPlate string) *cobra.Command
func NewCmdConvert ¶ added in v1.2.0
func NewCmdConvert(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
NewCmdConvert creates a command object for the generic "convert" action, which translates the config file into a given version.
func NewCmdCordon ¶ added in v1.2.0
func NewCmdCordon(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
func NewCmdCp ¶ added in v1.5.0
func NewCmdCp(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
NewCmdCp creates a new Copy command.
func NewCmdDelete ¶ added in v0.15.0
func NewCmdDelete(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
func NewCmdDescribe ¶ added in v0.15.0
func NewCmdDescribe(parent string, f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
func NewCmdDiff ¶ added in v1.9.0
func NewCmdDiff(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
func NewCmdDrain ¶ added in v1.2.0
func NewCmdDrain(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
func NewCmdEdit ¶ added in v1.1.0
func NewCmdEdit(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
func NewCmdExec ¶ added in v0.15.0
func NewCmdExec(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
func NewCmdExplain ¶ added in v1.2.0
func NewCmdExplain(parent string, f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
NewCmdExplain returns a cobra command for swagger docs
func NewCmdExposeService ¶ added in v0.15.0
func NewCmdExposeService(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
func NewCmdHelp ¶ added in v1.4.0
func NewCmdHelp() *cobra.Command
func NewCmdLabel ¶ added in v0.15.0
func NewCmdLabel(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
func NewCmdLogs ¶ added in v1.2.0
func NewCmdLogs(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
NewCmdLogs creates a new pod logs command
func NewCmdOptions ¶ added in v1.4.0
func NewCmdOptions(out io.Writer) *cobra.Command
NewCmdOptions implements the options command
func NewCmdPatch ¶ added in v0.21.0
func NewCmdPatch(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
func NewCmdPlugin ¶ added in v1.7.0
func NewCmdPlugin(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
func NewCmdPluginList ¶ added in v1.12.0
func NewCmdPluginList(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
NewCmdPluginList provides a way to list all plugin executables visible to kubectl
func NewCmdPortForward ¶ added in v0.15.0
func NewCmdPortForward(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
func NewCmdProxy ¶
func NewCmdProxy(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
func NewCmdReplace ¶ added in v0.21.0
func NewCmdReplace(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
func NewCmdRollingUpdate ¶ added in v0.15.0
func NewCmdRollingUpdate(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
func NewCmdRun ¶ added in v0.18.0
func NewCmdRun(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
func NewCmdScale ¶ added in v0.18.0
func NewCmdScale(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
NewCmdScale returns a cobra command with the appropriate configuration and flags to run scale
func NewCmdTaint ¶ added in v1.3.0
func NewCmdTaint(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
func NewCmdTop ¶ added in v1.4.0
func NewCmdTop(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
func NewCmdTopNode ¶ added in v1.4.0
func NewCmdTopNode(f cmdutil.Factory, o *TopNodeOptions, streams genericclioptions.IOStreams) *cobra.Command
func NewCmdTopPod ¶ added in v1.4.0
func NewCmdTopPod(f cmdutil.Factory, o *TopPodOptions, streams genericclioptions.IOStreams) *cobra.Command
func NewCmdUncordon ¶ added in v1.2.0
func NewCmdUncordon(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
func NewCmdVersion ¶
func NewCmdVersion(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
func NewDefaultKubectlCommand ¶ added in v1.10.0
func NewDefaultKubectlCommand() *cobra.Command
func NewDefaultKubectlCommandWithArgs ¶ added in v1.12.0
func NewDefaultKubectlCommandWithArgs(pluginHandler PluginHandler, args []string, in io.Reader, out, errout io.Writer) *cobra.Command
func NewKubectlCommand ¶ added in v0.15.0
func NewKubectlCommand(in io.Reader, out, err io.Writer) *cobra.Command
NewKubectlCommand creates the `kubectl` command and its nested children.
func RunCompletion ¶ added in v1.3.0
func RunCompletion(out io.Writer, boilerPlate string, cmd *cobra.Command, args []string) error
func RunDiff ¶ added in v1.9.0
func RunDiff(f cmdutil.Factory, diff *DiffProgram, options *DiffOptions, from, to string) error
RunDiff uses the factory to parse file arguments, find the version to diff, and find each Info object for each files, and runs against the differ.
func RunProxy ¶ added in v0.13.0
func RunProxy(f cmdutil.Factory, out io.Writer, cmd *cobra.Command) error
func ScaleJob ¶ added in v1.11.0
func ScaleJob(info *resource.Info, jobsClient batchclient.JobsGetter, count uint, preconditions *kubectl.ScalePrecondition, retry, waitForReplicas *kubectl.RetryParams) error
func SupportEviction ¶ added in v1.5.0
func SupportEviction(clientset kubernetes.Interface) (string, error)
SupportEviction uses Discovery API to find out if the server support eviction subresource If support, it will return its groupVersion; Otherwise, it will return ""
func SupportedMetricsAPIVersionAvailable ¶ added in v1.10.0
func SupportedMetricsAPIVersionAvailable(discoveredAPIGroups *metav1.APIGroupList) bool
Types ¶
type AnnotateOptions ¶ added in v1.1.0
type AnnotateOptions struct {
PrintFlags *genericclioptions.PrintFlags
PrintObj printers.ResourcePrinterFunc
// Filename options
resource.FilenameOptions
RecordFlags *genericclioptions.RecordFlags
Recorder genericclioptions.Recorder
genericclioptions.IOStreams
// contains filtered or unexported fields
}
AnnotateOptions have the data required to perform the annotate operation
func NewAnnotateOptions ¶ added in v1.11.0
func NewAnnotateOptions(ioStreams genericclioptions.IOStreams) *AnnotateOptions
func (*AnnotateOptions) Complete ¶ added in v1.1.0
func (o *AnnotateOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
Complete adapts from the command line args and factory to the data required.
func (AnnotateOptions) RunAnnotate ¶ added in v1.1.0
func (o AnnotateOptions) RunAnnotate() error
RunAnnotate does the work
type ApiResourcesOptions ¶ added in v1.11.0
type ApiResourcesOptions struct {
Output string
APIGroup string
Namespaced bool
Verbs []string
NoHeaders bool
Cached bool
genericclioptions.IOStreams
}
ApiResourcesOptions 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()
func NewAPIResourceOptions ¶ added in v1.11.0
func NewAPIResourceOptions(ioStreams genericclioptions.IOStreams) *ApiResourcesOptions
func (*ApiResourcesOptions) RunApiResources ¶ added in v1.11.0
func (o *ApiResourcesOptions) RunApiResources(cmd *cobra.Command, f cmdutil.Factory) error
type ApiVersionsOptions ¶ added in v1.11.0
type ApiVersionsOptions struct {
genericclioptions.IOStreams
// contains filtered or unexported fields
}
func NewApiVersionsOptions ¶ added in v1.11.0
func NewApiVersionsOptions(ioStreams genericclioptions.IOStreams) *ApiVersionsOptions
func (*ApiVersionsOptions) Complete ¶ added in v1.11.0
func (o *ApiVersionsOptions) Complete(f cmdutil.Factory) error
func (*ApiVersionsOptions) RunApiVersions ¶ added in v1.11.0
func (o *ApiVersionsOptions) RunApiVersions() error
type ApplyOptions ¶ added in v1.1.1
type ApplyOptions struct {
RecordFlags *genericclioptions.RecordFlags
Recorder genericclioptions.Recorder
PrintFlags *genericclioptions.PrintFlags
ToPrinter func(string) (printers.ResourcePrinter, error)
DeleteFlags *DeleteFlags
DeleteOptions *DeleteOptions
Selector string
DryRun bool
ServerDryRun bool
Prune bool
PruneResources []pruneResource
All bool
Overwrite bool
OpenApiPatch bool
PruneWhitelist []string
ShouldIncludeUninitialized bool
Validator validation.Schema
Builder *resource.Builder
Mapper meta.RESTMapper
DynamicClient dynamic.Interface
OpenAPISchema openapi.Resources
Namespace string
EnforceNamespace bool
genericclioptions.IOStreams
// contains filtered or unexported fields
}
func NewApplyOptions ¶ added in v1.11.0
func NewApplyOptions(ioStreams genericclioptions.IOStreams) *ApplyOptions
type AttachOptions ¶ added in v1.1.0
type AttachOptions struct {
StreamOptions
// whether to disable use of standard error when streaming output from tty
DisableStderr bool
CommandName string
SuggestedCmdUsage string
Pod *corev1.Pod
AttachFunc func(*AttachOptions, *corev1.Container, bool, remotecommand.TerminalSizeQueue) func() error
Resources []string
Builder func() *resource.Builder
AttachablePodFn polymorphichelpers.AttachableLogsForObjectFunc
Attach RemoteAttach
GetPodTimeout time.Duration
Config *restclient.Config
// contains filtered or unexported fields
}
AttachOptions declare the arguments accepted by the Exec command
func NewAttachOptions ¶ added in v1.12.0
func NewAttachOptions(streams genericclioptions.IOStreams) *AttachOptions
func (*AttachOptions) Complete ¶ added in v1.1.0
func (o *AttachOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
Complete verifies command line arguments and loads data from the command environment
func (*AttachOptions) GetContainerName ¶ added in v1.1.1
func (o *AttachOptions) GetContainerName(pod *corev1.Pod) (string, error)
GetContainerName returns the name of the container to attach to, with a fallback.
type AutoscaleOptions ¶ added in v1.3.0
type AutoscaleOptions struct {
FilenameOptions *resource.FilenameOptions
RecordFlags *genericclioptions.RecordFlags
Recorder genericclioptions.Recorder
PrintFlags *genericclioptions.PrintFlags
ToPrinter func(string) (printers.ResourcePrinter, error)
Name string
Generator string
Min int32
Max int32
CpuPercent int32
HPAClient autoscalingv1client.HorizontalPodAutoscalersGetter
genericclioptions.IOStreams
// contains filtered or unexported fields
}
func NewAutoscaleOptions ¶ added in v1.11.0
func NewAutoscaleOptions(ioStreams genericclioptions.IOStreams) *AutoscaleOptions
type CertificateOptions ¶ added in v1.5.0
type CertificateOptions struct {
resource.FilenameOptions
PrintFlags *genericclioptions.PrintFlags
PrintObj printers.ResourcePrinterFunc
genericclioptions.IOStreams
// contains filtered or unexported fields
}
func (*CertificateOptions) Complete ¶ added in v1.5.0
func (o *CertificateOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
func (*CertificateOptions) RunCertificateApprove ¶ added in v1.5.0
func (o *CertificateOptions) RunCertificateApprove(force bool) error
func (*CertificateOptions) RunCertificateDeny ¶ added in v1.5.0
func (o *CertificateOptions) RunCertificateDeny(force bool) error
type ClusterInfoDumpOptions ¶ added in v1.11.0
type ClusterInfoDumpOptions struct {
PrintFlags *genericclioptions.PrintFlags
PrintObj printers.ResourcePrinterFunc
OutputDir string
AllNamespaces bool
Namespaces []string
Timeout time.Duration
AppsClient appsv1client.AppsV1Interface
CoreClient corev1client.CoreV1Interface
Namespace string
RESTClientGetter genericclioptions.RESTClientGetter
LogsForObject polymorphichelpers.LogsForObjectFunc
genericclioptions.IOStreams
}
type ClusterInfoOptions ¶ added in v1.11.0
type ClusterInfoOptions struct {
genericclioptions.IOStreams
Namespace string
Builder *resource.Builder
Client *restclient.Config
}
type CommandOverrideVerifier ¶ added in v1.12.0
type CommandOverrideVerifier struct {
// contains filtered or unexported fields
}
type ConvertOptions ¶ added in v1.2.0
type ConvertOptions struct {
PrintFlags *genericclioptions.PrintFlags
Printer printers.ResourcePrinter
OutputVersion string
Namespace string
resource.FilenameOptions
genericclioptions.IOStreams
// contains filtered or unexported fields
}
ConvertOptions have the data required to perform the convert operation
func NewConvertOptions ¶ added in v1.11.0
func NewConvertOptions(ioStreams genericclioptions.IOStreams) *ConvertOptions
func (*ConvertOptions) Complete ¶ added in v1.2.0
func (o *ConvertOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) (err error)
Complete collects information required to run Convert command from command line.
func (*ConvertOptions) RunConvert ¶ added in v1.2.0
func (o *ConvertOptions) RunConvert() error
RunConvert implements the generic Convert command
type CopyOptions ¶ added in v1.11.0
type CopyOptions struct {
Container string
Namespace string
ClientConfig *restclient.Config
Clientset kubernetes.Interface
genericclioptions.IOStreams
}
func NewCopyOptions ¶ added in v1.11.0
func NewCopyOptions(ioStreams genericclioptions.IOStreams) *CopyOptions
type DefaultRemoteAttach ¶ added in v1.1.0
type DefaultRemoteAttach struct{}
DefaultRemoteAttach is the standard implementation of attaching
type DefaultRemoteExecutor ¶ added in v1.1.0
type DefaultRemoteExecutor struct{}
DefaultRemoteExecutor is the standard implementation of remote command execution
type DeleteFlags ¶ added in v1.11.0
type DeleteFlags struct {
FileNameFlags *genericclioptions.FileNameFlags
LabelSelector *string
FieldSelector *string
All *bool
Cascade *bool
Force *bool
GracePeriod *int
IgnoreNotFound *bool
Now *bool
Timeout *time.Duration
Wait *bool
Output *string
}
PrintFlags composes common printer flag structs used for commands requiring deletion logic.
func NewDeleteCommandFlags ¶ added in v1.11.0
func NewDeleteCommandFlags(usage string) *DeleteFlags
NewDeleteCommandFlags provides default flags and values for use with the "delete" command
func NewDeleteFlags ¶ added in v1.11.0
func NewDeleteFlags(usage string) *DeleteFlags
NewDeleteFlags provides default flags and values for use in commands outside of "delete"
type DeleteOptions ¶ added in v1.1.0
type DeleteOptions struct {
resource.FilenameOptions
LabelSelector string
FieldSelector string
DeleteAll bool
IgnoreNotFound bool
Cascade bool
DeleteNow bool
ForceDeletion bool
WaitForDeletion bool
GracePeriod int
Timeout time.Duration
Output string
DynamicClient dynamic.Interface
Mapper meta.RESTMapper
Result *resource.Result
genericclioptions.IOStreams
}
func (*DeleteOptions) Complete ¶ added in v1.6.0
func (o *DeleteOptions) Complete(f cmdutil.Factory, args []string, cmd *cobra.Command) error
func (*DeleteOptions) DeleteResult ¶ added in v1.11.0
func (o *DeleteOptions) DeleteResult(r *resource.Result) error
type DescribeOptions ¶ added in v1.1.0
type DescribeOptions struct {
CmdParent string
Selector string
Namespace string
Describer func(*meta.RESTMapping) (printers.Describer, error)
NewBuilder func() *resource.Builder
BuilderArgs []string
EnforceNamespace bool
AllNamespaces bool
IncludeUninitialized bool
DescriberSettings *printers.DescriberSettings
FilenameOptions *resource.FilenameOptions
genericclioptions.IOStreams
}
func (*DescribeOptions) Complete ¶ added in v1.11.0
func (o *DescribeOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
func (*DescribeOptions) DescribeMatchingResources ¶ added in v1.11.0
func (o *DescribeOptions) DescribeMatchingResources(originalError error, resource, prefix string) error
type DiffOptions ¶ added in v1.9.0
type DiffOptions struct {
FilenameOptions resource.FilenameOptions
}
type DiffProgram ¶ added in v1.9.0
type DiffProgram struct {
Exec exec.Interface
genericclioptions.IOStreams
}
DiffProgram finds and run the diff program. The value of KUBERNETES_EXTERNAL_DIFF environment variable will be used a diff program. By default, `diff(1)` will be used.
type DiffVersion ¶ added in v1.9.0
type DiffVersion struct {
Dir *Directory
Name string
}
DiffVersion gets the proper version of objects, and aggregate them into a directory.
func NewDiffVersion ¶ added in v1.9.0
func NewDiffVersion(name string) (*DiffVersion, error)
NewDiffVersion creates a new DiffVersion with the named version.
type Differ ¶ added in v1.9.0
type Differ struct {
From *DiffVersion
To *DiffVersion
}
Differ creates two DiffVersion and diffs them.
func (*Differ) Diff ¶ added in v1.9.0
func (d *Differ) Diff(obj Object, printer Printer) error
Diff diffs to versions of a specific object, and print both versions to directories.
type Directory ¶ added in v1.9.0
type Directory struct {
Name string
}
Directory creates a new temp directory, and allows to easily create new files.
func CreateDirectory ¶ added in v1.9.0
func CreateDirectory(prefix string) (*Directory, error)
CreateDirectory does create the actual disk directory, and return a new representation of it.
type Downloader ¶ added in v1.11.0
type Downloader struct {
// contains filtered or unexported fields
}
func NewDownloader ¶ added in v1.11.0
func NewDownloader(f cmdutil.Factory) (*Downloader, error)
type DrainOptions ¶ added in v1.2.0
type DrainOptions struct {
PrintFlags *genericclioptions.PrintFlags
ToPrinter func(string) (printers.ResourcePrinterFunc, error)
Namespace string
Force bool
DryRun bool
GracePeriodSeconds int
IgnoreDaemonsets bool
Timeout time.Duration
DeleteLocalData bool
Selector string
PodSelector string
genericclioptions.IOStreams
// contains filtered or unexported fields
}
func NewDrainOptions ¶ added in v1.11.0
func NewDrainOptions(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *DrainOptions
func (*DrainOptions) Complete ¶ added in v1.11.0
func (o *DrainOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
Complete populates some fields from the factory, grabs command line arguments and looks up the node using Builder
func (*DrainOptions) RunCordonOrUncordon ¶ added in v1.2.0
func (o *DrainOptions) RunCordonOrUncordon(desired bool) error
RunCordonOrUncordon runs either Cordon or Uncordon. The desired value for "Unschedulable" is passed as the first arg.
type ExecOptions ¶ added in v1.1.0
type ExecOptions struct {
StreamOptions
Command []string
FullCmdName string
SuggestedCmdUsage string
Executor RemoteExecutor
PodClient coreclient.PodsGetter
Config *restclient.Config
}
ExecOptions declare the arguments accepted by the Exec command
func (*ExecOptions) Complete ¶ added in v1.1.0
func (p *ExecOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, argsIn []string, argsLenAtDash int) error
Complete verifies command line arguments and loads data from the command environment
type ExplainOptions ¶ added in v1.11.0
type ExplainOptions struct {
genericclioptions.IOStreams
CmdParent string
ApiVersion string
Recursive bool
Mapper meta.RESTMapper
Schema openapi.Resources
}
func NewExplainOptions ¶ added in v1.11.0
func NewExplainOptions(parent string, streams genericclioptions.IOStreams) *ExplainOptions
func (*ExplainOptions) Complete ¶ added in v1.11.0
func (o *ExplainOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error
type ExposeServiceOptions ¶ added in v1.11.0
type ExposeServiceOptions struct {
FilenameOptions resource.FilenameOptions
RecordFlags *genericclioptions.RecordFlags
PrintFlags *genericclioptions.PrintFlags
PrintObj printers.ResourcePrinterFunc
DryRun bool
EnforceNamespace bool
Generators func(string) map[string]kubectl.Generator
CanBeExposed polymorphichelpers.CanBeExposedFunc
MapBasedSelectorForObject func(runtime.Object) (string, error)
PortsForObject polymorphichelpers.PortsForObjectFunc
ProtocolsForObject func(runtime.Object) (map[string]string, error)
Namespace string
Mapper meta.RESTMapper
DynamicClient dynamic.Interface
Builder *resource.Builder
Recorder genericclioptions.Recorder
genericclioptions.IOStreams
}
func NewExposeServiceOptions ¶ added in v1.11.0
func NewExposeServiceOptions(ioStreams genericclioptions.IOStreams) *ExposeServiceOptions
type HeapsterTopOptions ¶ added in v1.6.0
type HeapsterTopOptions struct {
Namespace string
Service string
Scheme string
Port string
}
type InfoObject ¶ added in v1.9.0
type InfoObject struct {
Remote *unstructured.Unstructured
Info *resource.Info
Encoder runtime.Encoder
Parser *parse.Factory
}
InfoObject is an implementation of the Object interface. It gets all the information from the Info object.
func (InfoObject) Last ¶ added in v1.9.0
func (obj InfoObject) Last() (map[string]interface{}, error)
func (InfoObject) Live ¶ added in v1.9.0
func (obj InfoObject) Live() (map[string]interface{}, error)
func (InfoObject) Local ¶ added in v1.9.0
func (obj InfoObject) Local() (map[string]interface{}, error)
type LabelOptions ¶ added in v1.1.0
type LabelOptions struct {
// Filename options
resource.FilenameOptions
RecordFlags *genericclioptions.RecordFlags
PrintFlags *genericclioptions.PrintFlags
ToPrinter func(string) (printers.ResourcePrinter, error)
Recorder genericclioptions.Recorder
// Common shared fields
genericclioptions.IOStreams
// contains filtered or unexported fields
}
LabelOptions have the data required to perform the label operation
func NewLabelOptions ¶ added in v1.11.0
func NewLabelOptions(ioStreams genericclioptions.IOStreams) *LabelOptions
func (*LabelOptions) Complete ¶ added in v1.5.0
func (o *LabelOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
Complete adapts from the command line args and factory to the data required.
type LogsOptions ¶ added in v1.2.0
type LogsOptions struct {
Namespace string
ResourceArg string
AllContainers bool
Options runtime.Object
Resources []string
ConsumeRequestFn func(*rest.Request, io.Writer) error
// PodLogOptions
SinceTime string
SinceSeconds time.Duration
Follow bool
Previous bool
Timestamps bool
LimitBytes int64
Tail int64
Container string
// whether or not a container name was given via --container
ContainerNameSpecified bool
Selector string
Object runtime.Object
GetPodTimeout time.Duration
RESTClientGetter genericclioptions.RESTClientGetter
LogsForObject polymorphichelpers.LogsForObjectFunc
genericclioptions.IOStreams
}
func NewLogsOptions ¶ added in v1.11.0
func NewLogsOptions(streams genericclioptions.IOStreams, allContainers bool) *LogsOptions
func (*LogsOptions) Complete ¶ added in v1.2.0
func (o *LogsOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
func (LogsOptions) RunLogs ¶ added in v1.2.0
func (o LogsOptions) RunLogs() error
RunLogs retrieves a pod log
func (*LogsOptions) ToLogOptions ¶ added in v1.12.0
func (o *LogsOptions) ToLogOptions() (*corev1.PodLogOptions, error)
type Object ¶ added in v1.9.0
type Object interface {
Local() (map[string]interface{}, error)
Live() (map[string]interface{}, error)
Last() (map[string]interface{}, error)
Merged() (map[string]interface{}, error)
Name() string
}
Object is an interface that let's you retrieve multiple version of it.
type PatchBuffer ¶ added in v1.7.0
type PatchBuffer struct {
Patch []byte
PatchType types.PatchType
}
type PatchOptions ¶ added in v1.1.0
type PatchOptions struct {
resource.FilenameOptions
RecordFlags *genericclioptions.RecordFlags
PrintFlags *genericclioptions.PrintFlags
ToPrinter func(string) (printers.ResourcePrinter, error)
Recorder genericclioptions.Recorder
Local bool
PatchType string
Patch string
genericclioptions.IOStreams
// contains filtered or unexported fields
}
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()
func NewPatchOptions ¶ added in v1.11.0
func NewPatchOptions(ioStreams genericclioptions.IOStreams) *PatchOptions
type PathVerifier ¶ added in v1.12.0
type PathVerifier interface {
// Verify determines if a given path is valid
Verify(path string) []error
}
pathVerifier receives a path and determines if it is valid or not
type PluginHandler ¶ added in v1.12.0
type PluginHandler interface {
// Lookup receives a potential filename and returns
// a full or relative path to an executable, if one
// exists at the given filename, or an error.
Lookup(filename string) (string, error)
// Execute receives an executable's filepath, a slice
// of arguments, and a slice of environment variables
// to relay to the executable.
Execute(executablePath string, cmdArgs, environment []string) error
}
PluginHandler is capable of parsing command line arguments and performing executable filename lookups to search for valid plugin files, and execute found plugins.
type PluginListOptions ¶ added in v1.12.0
type PluginListOptions struct {
Verifier PathVerifier
NameOnly bool
genericclioptions.IOStreams
}
type PortForwardOptions ¶ added in v1.4.0
type PortForwardOptions struct {
Namespace string
PodName string
RESTClient *restclient.RESTClient
Config *restclient.Config
PodClient corev1client.PodsGetter
Ports []string
PortForwarder portForwarder
StopChannel chan struct{}
ReadyChannel chan struct{}
}
PortForwardOptions contains all the options for running the port-forward cli command.
func (*PortForwardOptions) Complete ¶ added in v1.4.0
func (o *PortForwardOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
Complete completes all the required options for port-forward cmd.
func (PortForwardOptions) RunPortForward ¶ added in v1.4.0
func (o PortForwardOptions) RunPortForward() error
RunPortForward implements all the necessary functionality for port-forward cmd.
type RemoteAttach ¶ added in v1.1.0
type RemoteAttach interface {
Attach(method string, url *url.URL, config *restclient.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool, terminalSizeQueue remotecommand.TerminalSizeQueue) error
}
RemoteAttach defines the interface accepted by the Attach command - provided for test stubbing
type RemoteExecutor ¶ added in v1.1.0
type RemoteExecutor interface {
Execute(method string, url *url.URL, config *restclient.Config, stdin io.Reader, stdout, stderr io.Writer, tty bool, terminalSizeQueue remotecommand.TerminalSizeQueue) error
}
RemoteExecutor defines the interface accepted by the Exec command - provided for test stubbing
type ReplaceOptions ¶ added in v1.1.0
type ReplaceOptions struct {
PrintFlags *genericclioptions.PrintFlags
DeleteFlags *DeleteFlags
RecordFlags *genericclioptions.RecordFlags
DeleteOptions *DeleteOptions
PrintObj func(obj runtime.Object) error
Schema validation.Schema
Builder func() *resource.Builder
BuilderArgs []string
Namespace string
EnforceNamespace bool
Recorder genericclioptions.Recorder
genericclioptions.IOStreams
// contains filtered or unexported fields
}
func NewReplaceOptions ¶ added in v1.11.0
func NewReplaceOptions(streams genericclioptions.IOStreams) *ReplaceOptions
type RollingUpdateOptions ¶ added in v1.1.0
type RollingUpdateOptions struct {
FilenameOptions *resource.FilenameOptions
OldName string
KeepOldName bool
DeploymentKey string
Image string
Container string
PullPolicy string
Rollback bool
Period time.Duration
Timeout time.Duration
Interval time.Duration
DryRun bool
OutputFormat string
Namespace string
EnforceNamespace bool
ScaleClient scaleclient.ScalesGetter
ClientSet kubernetes.Interface
Builder *resource.Builder
ShouldValidate bool
Validator func(bool) (validation.Schema, error)
FindNewName func(*corev1.ReplicationController) string
PrintFlags *genericclioptions.PrintFlags
ToPrinter func(string) (printers.ResourcePrinter, error)
genericclioptions.IOStreams
}
func NewRollingUpdateOptions ¶ added in v1.11.0
func NewRollingUpdateOptions(streams genericclioptions.IOStreams) *RollingUpdateOptions
type RunObject ¶ added in v1.8.0
type RunObject struct {
Object runtime.Object
Mapping *meta.RESTMapping
}
type RunOptions ¶ added in v1.11.0
type RunOptions struct {
PrintFlags *genericclioptions.PrintFlags
DeleteFlags *DeleteFlags
DeleteOptions *DeleteOptions
RecordFlags *genericclioptions.RecordFlags
DryRun bool
PrintObj func(runtime.Object) error
Recorder genericclioptions.Recorder
DynamicClient dynamic.Interface
ArgsLenAtDash int
Attach bool
Expose bool
Generator string
Image string
Interactive bool
LeaveStdinOpen bool
Port string
Quiet bool
Schedule string
TTY bool
genericclioptions.IOStreams
}
func NewRunOptions ¶ added in v1.11.0
func NewRunOptions(streams genericclioptions.IOStreams) *RunOptions
type ScaleOptions ¶ added in v1.1.0
type ScaleOptions struct {
FilenameOptions resource.FilenameOptions
RecordFlags *genericclioptions.RecordFlags
PrintFlags *genericclioptions.PrintFlags
PrintObj printers.ResourcePrinterFunc
Selector string
All bool
Replicas int
ResourceVersion string
CurrentReplicas int
Timeout time.Duration
Recorder genericclioptions.Recorder
genericclioptions.IOStreams
// contains filtered or unexported fields
}
func NewScaleOptions ¶ added in v1.11.0
func NewScaleOptions(ioStreams genericclioptions.IOStreams) *ScaleOptions
func (*ScaleOptions) Complete ¶ added in v1.11.0
func (o *ScaleOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
type SetLastAppliedOptions ¶ added in v1.6.0
type SetLastAppliedOptions struct {
CreateAnnotation bool
PrintFlags *genericclioptions.PrintFlags
PrintObj printers.ResourcePrinterFunc
FilenameOptions resource.FilenameOptions
genericclioptions.IOStreams
// contains filtered or unexported fields
}
func NewSetLastAppliedOptions ¶ added in v1.11.0
func NewSetLastAppliedOptions(ioStreams genericclioptions.IOStreams) *SetLastAppliedOptions
func (*SetLastAppliedOptions) Complete ¶ added in v1.6.0
func (o *SetLastAppliedOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error
func (*SetLastAppliedOptions) RunSetLastApplied ¶ added in v1.6.0
func (o *SetLastAppliedOptions) RunSetLastApplied() error
type StreamOptions ¶ added in v1.4.0
type StreamOptions struct {
Namespace string
PodName string
ContainerName string
Stdin bool
TTY bool
// minimize unnecessary output
Quiet bool
// InterruptParent, if set, is used to handle interrupts while attached
InterruptParent *interrupt.Handler
genericclioptions.IOStreams
// contains filtered or unexported fields
}
type TaintOptions ¶ added in v1.3.0
type TaintOptions struct {
PrintFlags *genericclioptions.PrintFlags
ToPrinter func(string) (printers.ResourcePrinter, error)
ClientForMapping func(*meta.RESTMapping) (resource.RESTClient, error)
genericclioptions.IOStreams
// contains filtered or unexported fields
}
TaintOptions have the data required to perform the taint operation
func (*TaintOptions) Complete ¶ added in v1.3.0
func (o *TaintOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) (err error)
Complete adapts from the command line args and factory to the data required.
type TopNodeOptions ¶ added in v1.4.0
type TopNodeOptions struct {
ResourceName string
Selector string
NodeClient corev1client.CoreV1Interface
HeapsterOptions HeapsterTopOptions
Client *metricsutil.HeapsterMetricsClient
Printer *metricsutil.TopCmdPrinter
DiscoveryClient discovery.DiscoveryInterface
MetricsClient metricsclientset.Interface
genericclioptions.IOStreams
}
TopNodeOptions contains all the options for running the top-node cli command.
func (*TopNodeOptions) Complete ¶ added in v1.4.0
func (o *TopNodeOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
func (TopNodeOptions) RunTopNode ¶ added in v1.4.0
func (o TopNodeOptions) RunTopNode() error
type TopPodOptions ¶ added in v1.4.0
type TopPodOptions struct {
ResourceName string
Namespace string
Selector string
AllNamespaces bool
PrintContainers bool
PodClient corev1client.PodsGetter
HeapsterOptions HeapsterTopOptions
Client *metricsutil.HeapsterMetricsClient
Printer *metricsutil.TopCmdPrinter
DiscoveryClient discovery.DiscoveryInterface
MetricsClient metricsclientset.Interface
genericclioptions.IOStreams
}
type Version ¶ added in v1.7.0
type Version struct {
ClientVersion *apimachineryversion.Info `json:"clientVersion,omitempty" yaml:"clientVersion,omitempty"`
ServerVersion *apimachineryversion.Info `json:"serverVersion,omitempty" yaml:"serverVersion,omitempty"`
}
type VersionOptions ¶ added in v1.8.0
type VersionOptions struct {
ClientOnly bool
Short bool
Output string
genericclioptions.IOStreams
// contains filtered or unexported fields
}
func NewVersionOptions ¶ added in v1.11.0
func NewVersionOptions(ioStreams genericclioptions.IOStreams) *VersionOptions
type ViewLastAppliedOptions ¶ added in v1.6.0
type ViewLastAppliedOptions struct {
FilenameOptions resource.FilenameOptions
Selector string
LastAppliedConfigurationList []string
OutputFormat string
All bool
Factory cmdutil.Factory
genericclioptions.IOStreams
}
func NewViewLastAppliedOptions ¶ added in v1.11.0
func NewViewLastAppliedOptions(ioStreams genericclioptions.IOStreams) *ViewLastAppliedOptions
func (*ViewLastAppliedOptions) Complete ¶ added in v1.6.0
func (o *ViewLastAppliedOptions) Complete(cmd *cobra.Command, f cmdutil.Factory, args []string) error
func (*ViewLastAppliedOptions) RunApplyViewLastApplied ¶ added in v1.6.0
func (o *ViewLastAppliedOptions) RunApplyViewLastApplied(cmd *cobra.Command) error
Source Files
¶
- alpha.go
- annotate.go
- apiresources.go
- apiversions.go
- apply.go
- apply_edit_last_applied.go
- apply_set_last_applied.go
- apply_view_last_applied.go
- attach.go
- autoscale.go
- certificates.go
- clusterinfo.go
- clusterinfo_dump.go
- cmd.go
- completion.go
- convert.go
- cp.go
- delete.go
- delete_flags.go
- describe.go
- diff.go
- drain.go
- edit.go
- exec.go
- explain.go
- expose.go
- help.go
- label.go
- logs.go
- options.go
- patch.go
- plugin.go
- portforward.go
- proxy.go
- replace.go
- rollingupdate.go
- run.go
- scale.go
- taint.go
- top.go
- top_node.go
- top_pod.go
- version.go
Directories
¶
Path | Synopsis |
---|---|
Package scalejob is deprecated This package contains deprecated functions used to "scale" jobs in a way inconsistent with normal scaling rules
|
Package scalejob is deprecated This package contains deprecated functions used to "scale" jobs in a way inconsistent with normal scaling rules |
env
Package env provides functions to incorporate environment variables into set env.
|
Package env provides functions to incorporate environment variables into set env. |
openapi
Package openapi is a collection of libraries for fetching the openapi spec from a Kubernetes server and then indexing the type definitions.
|
Package openapi is a collection of libraries for fetching the openapi spec from a Kubernetes server and then indexing the type definitions. |