Documentation
¶
Overview ¶
Example (View) ¶
Output:
apiVersion: v1
clusters:
- cluster:
server: http://cow.org:8080
name: cow-cluster
contexts:
- context:
cluster: cow-cluster
user: red-user
name: federal-context
current-context: federal-context
kind: Config
preferences: {}
users:
- name: red-user
user:
token: red-token
Index ¶
- func NewCmdConfig(pathOptions *clientcmd.PathOptions, out, errOut io.Writer) *cobra.Command
- func NewCmdConfigCurrentContext(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
- func NewCmdConfigDeleteCluster(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
- func NewCmdConfigDeleteContext(out, errOut io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
- func NewCmdConfigGetClusters(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
- func NewCmdConfigGetContexts(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
- func NewCmdConfigRenameContext(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
- func NewCmdConfigSet(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
- func NewCmdConfigSetAuthInfo(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
- func NewCmdConfigSetCluster(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
- func NewCmdConfigSetContext(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
- func NewCmdConfigUnset(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
- func NewCmdConfigUseContext(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
- func NewCmdConfigView(out, errOut io.Writer, ConfigAccess clientcmd.ConfigAccess) *cobra.Command
- func RunCurrentContext(out io.Writer, options *CurrentContextOptions) error
- type CurrentContextOptions
- type GetContextsOptions
- type RenameContextOptions
- type ViewOptions
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmdConfig ¶
func NewCmdConfig(pathOptions *clientcmd.PathOptions, out, errOut io.Writer) *cobra.Command
NewCmdConfig creates a command object for the "config" action, and adds all child commands to it.
func NewCmdConfigCurrentContext ¶ added in v1.2.0
func NewCmdConfigCurrentContext(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
func NewCmdConfigDeleteCluster ¶ added in v1.4.0
func NewCmdConfigDeleteCluster(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
func NewCmdConfigDeleteContext ¶ added in v1.4.0
func NewCmdConfigDeleteContext(out, errOut io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
func NewCmdConfigGetClusters ¶ added in v1.4.0
func NewCmdConfigGetClusters(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
NewCmdConfigGetClusters creates a command object for the "get-clusters" action, which lists all clusters defined in the kubeconfig.
func NewCmdConfigGetContexts ¶ added in v1.4.0
func NewCmdConfigGetContexts(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
NewCmdConfigGetContexts creates a command object for the "get-contexts" action, which retrieves one or more contexts from a kubeconfig.
func NewCmdConfigRenameContext ¶ added in v1.7.0
func NewCmdConfigRenameContext(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
NewCmdConfigRenameContext creates a command object for the "rename-context" action
func NewCmdConfigSet ¶
func NewCmdConfigSet(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
func NewCmdConfigSetAuthInfo ¶
func NewCmdConfigSetAuthInfo(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
func NewCmdConfigSetCluster ¶
func NewCmdConfigSetCluster(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
func NewCmdConfigSetContext ¶
func NewCmdConfigSetContext(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
func NewCmdConfigUnset ¶
func NewCmdConfigUnset(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
func NewCmdConfigUseContext ¶
func NewCmdConfigUseContext(out io.Writer, configAccess clientcmd.ConfigAccess) *cobra.Command
func NewCmdConfigView ¶
func NewCmdConfigView(out, errOut io.Writer, ConfigAccess clientcmd.ConfigAccess) *cobra.Command
func RunCurrentContext ¶ added in v1.2.0
func RunCurrentContext(out io.Writer, options *CurrentContextOptions) error
Types ¶
type CurrentContextOptions ¶ added in v1.2.0
type CurrentContextOptions struct {
ConfigAccess clientcmd.ConfigAccess
}
type GetContextsOptions ¶ added in v1.4.0
type GetContextsOptions struct {
// contains filtered or unexported fields
}
GetContextsOptions contains the assignable options from the args.
func (*GetContextsOptions) Complete ¶ added in v1.4.0
func (o *GetContextsOptions) Complete(cmd *cobra.Command, args []string, out io.Writer) error
Complete assigns GetContextsOptions from the args.
func (GetContextsOptions) RunGetContexts ¶ added in v1.4.0
func (o GetContextsOptions) RunGetContexts() error
RunGetContexts implements all the necessary functionality for context retrieval.
type RenameContextOptions ¶ added in v1.7.0
type RenameContextOptions struct {
// contains filtered or unexported fields
}
RenameContextOptions contains the options for running the rename-context cli command.
func (*RenameContextOptions) Complete ¶ added in v1.7.0
func (o *RenameContextOptions) Complete(cmd *cobra.Command, args []string, out io.Writer) error
Complete assigns RenameContextOptions from the args.
func (RenameContextOptions) RunRenameContext ¶ added in v1.7.0
func (o RenameContextOptions) RunRenameContext(out io.Writer) error
type ViewOptions ¶ added in v0.16.0
type ViewOptions struct {
ConfigAccess clientcmd.ConfigAccess
Merge flag.Tristate
Flatten bool
Minify bool
RawByteData bool
}