kuberc (v1alpha1)
Resource Types
Preference
Preference stores elements of KubeRC configuration file
Field | Description |
---|---|
apiVersion string | kubectl.config.k8s.io/v1alpha1 |
kind string | Preference |
overrides [Required][]CommandOverride
|
overrides allows changing default flag values of commands. This is especially useful, when user doesn't want to explicitly set flags each time. |
aliases [Required][]AliasOverride
|
aliases allows defining command aliases for existing kubectl commands, with optional default flag values. If the alias name collides with a built-in command, built-in command always takes precedence. Flag overrides defined in the overrides section do NOT apply to aliases for the same command. kubectl [ALIAS NAME] [USER_FLAGS] [USER_EXPLICIT_ARGS] expands to kubectl [COMMAND] # built-in command alias points to [KUBERC_PREPEND_ARGS] [USER_FLAGS] [KUBERC_FLAGS] # rest of the flags that are not passed by user in [USER_FLAGS] [USER_EXPLICIT_ARGS] [KUBERC_APPEND_ARGS] e.g.
|
AliasOverride
Appears in:
AliasOverride stores the alias definitions.
Field | Description |
---|---|
name [Required]string
|
Name is the name of alias that can only include alphabetical characters If the alias name conflicts with the built-in command, built-in command will be used. |
command [Required]string
|
Command is the single or set of commands to execute, such as "set env" or "create" |
prependArgs [Required][]string
|
PrependArgs stores the arguments such as resource names, etc. These arguments are inserted after the alias name. |
appendArgs [Required][]string
|
AppendArgs stores the arguments such as resource names, etc. These arguments are appended to the USER_ARGS. |
flags [Required][]CommandOverrideFlag
|
Flag is allocated to store the flag definitions of alias. Flag only modifies the default value of the flag and if user explicitly passes a value, explicit one is used. |
CommandOverride
Appears in:
CommandOverride stores the commands and their associated flag's default values.
Field | Description |
---|---|
command [Required]string
|
Command refers to a command whose flag's default value is changed. |
flags [Required][]CommandOverrideFlag
|
Flags is a list of flags storing different default values. |
CommandOverrideFlag
Appears in:
CommandOverrideFlag stores the name and the specified default value of the flag.
Field | Description |
---|---|
name [Required]string
|
Flag name (long form, without dashes). |
default [Required]string
|
In a string format of a default value. It will be parsed by kubectl to the compatible value of the flag. |
This page is automatically generated.
If you plan to report an issue with this page, mention that the page is auto-generated in your issue description. The fix may need to happen elsewhere in the Kubernetes project.