kuberc (v1alpha1)
资源类型
Preference
Preference
存储 KubeRC 配置文件的元素
字段 | 描述 |
---|---|
apiVersion string | kubectl.config.k8s.io/v1alpha1 |
kind string | Preference |
overrides [必需][]CommandOverride |
|
aliases [必需][]AliasOverride |
例如:
例如,如果用户调用
"kubectl getn control-plane-1" 扩展为 "kubectl get node control-plane-1 --output=wide" "kubectl getn control-plane-1 --output=json" 扩展为 "kubectl get node --output=json control-plane-1" |
AliasOverride
出现在:
AliasOverride
存储别名定义。
字段 | 描述 |
---|---|
name [必需]string |
|
command [必需]string |
|
prependArgs [必需][]string |
|
appendArgs [必需][]string |
|
flags [必需][]CommandOptionDefault |
|
CommandDefaults
出现在:
CommandDefaults
存储命令及其关联参数的默认值。
字段 | 描述 |
---|---|
command [必需]string |
|
flags [必需][]CommandDefaults |
|
CommandOptionDefault
出现在:
CommandOptionDefault
存储参数的名称和指定的默认值。
字段 | 描述 |
---|---|
name [必需]string |
|
default [必需]string | 在默认值的字符串格式中。它将被 kubectl 解析为标志的兼容值。 |