此文档中的信息可能已过时
此文档的更新日期比原文晚,因此其中的信息可能已过时。如果能阅读英文,请查看英文版本以获取最新信息: kubeconfig (v1)
kube 配置 (v1)
资源类型
Config    
Config 保存以给定用户身份构建连接到远程 Kubernetes 集群所需的信息
| 字段 | 描述 | 
|---|---|
| apiVersionstring | /v1 | 
| kindstring | Config | 
| kindstring | 来自 pkg/api/types.go TypeMeta 的遗留字段。 | 
| apiVersionstring | 来自 pkg/api/types.go TypeMeta 的遗留字段。 | 
| preferences[必需]Preferences | 
 | 
| clusters[必需][]NamedCluster | 
 | 
| users[必需][]NamedAuthInfo | 
 | 
| contexts[必需][]NamedContext | 
 | 
| current-context[必需]string | 
 | 
| extensions[]NamedExtension | 
 | 
AuthInfo    
出现在:
AuthInfo 包含描述身份信息的信息。这一信息用来告诉 kubernetes 集群你是谁。
| 字段 | 描述 | 
|---|---|
| client-certificatestring | 
 | 
| client-certificate-data[]byte | 
 | 
| client-keystring | 
 | 
| client-key-data[]byte | 
 | 
| tokenstring | 
 | 
| tokenFilestring | 
 | 
| asstring | 
 | 
| as-uidstring | 
 | 
| as-groups[]string | 
 | 
| as-user-extramap[string][]string | 
 | 
| usernamestring | 
 | 
| passwordstring | 
 | 
| auth-providerAuthProviderConfig | 
 | 
| execExecConfig | 
 | 
| extensions[]NamedExtension | 
 | 
AuthProviderConfig    
出现在:
AuthProviderConfig 保存特定于某认证提供机制的配置。
| 字段 | 描述 | 
|---|---|
| name[必需]string | 配置选项名称。 | 
| config[必需]map[string]string | 配置选项取值映射。 | 
Cluster    
出现在:
Cluster 包含有关如何与 Kubernetes 集群通信的信息。
| 字段 | 描述 | 
|---|---|
| server[必需]string | 
 | 
| tls-server-namestring | 
 | 
| insecure-skip-tls-verifybool | 
 | 
| certificate-authoritystring | 
 | 
| certificate-authority-data[]byte | 
 | 
| proxy-urlstring | 
 
 | 
| disable-compressionbool | 
 | 
| extensions[]NamedExtension | 
 | 
Context    
出现在:
Context 是一个元组,包含对集群 (我如何与某 Kubernetes 集群通信)、用户 (我如何标识自己) 和名字空间(我想要使用哪些资源子集)的引用。
| 字段 | 描述 | 
|---|---|
| cluster[必需]string | 
 | 
| user[必需]string | 
 | 
| namespacestring | 
 | 
| extensions[]NamedExtension | 
 | 
ExecConfig    
出现在:
ExecConfig 指定提供客户端凭证的命令。这个命令被执行(以 exec 方式)
并输出结构化的标准输出(stdout),其中包含了凭据。
查看 client.authentication.k8s.io API
组以获取输入和输出的确切格式规范。
| 字段 | 描述 | 
|---|---|
| command[必需]string | command 是要执行的命令。 | 
| args[]string | 
 | 
| env[]ExecEnvVar | 
 | 
| apiVersion[必需]string | 
 | 
| installHint[必需]string | 当似乎找不到可执行文件时,将向用户显示此文本。
  例如,对于在 Mac OS 系统上安装  | 
| provideClusterInfo[必需]bool | 
 | 
| interactiveModeExecInteractiveMode | 
 
 查看  如果  | 
ExecEnvVar    
出现在:
ExecEnvVar 用于在执行基于 exec 的凭据插件时要设置的环境变量。
| 字段 | 描述 | 
|---|---|
| name[必需] string | 环境变量名称。 | 
| value[必需]string | 环境变量取值。 | 
ExecInteractiveMode    
(string 的别名)
出现在:
ExecInteractiveMode 是一个描述 exec 插件与标准输入间关系的字符串。
NamedAuthInfo    
出现在:
NamedAuthInfo 将昵称与身份认证信息关联起来。
| 字段 | 描述 | 
|---|---|
| name[必需]string | 
 | 
| user[必需]AuthInfo | 
 | 
NamedCluster    
出现在:
NamedCluster 将昵称与集群信息关联起来。
| 字段 | 描述 | 
|---|---|
| name[必需]string | 
 | 
| cluster[必需] Cluster | 
 | 
NamedContext    
出现在:
NamedContext 将昵称与上下文信息关联起来。
| 字段 | 描述 | 
|---|---|
| name[必需]string | 
 | 
| context[必需] Context | 
 | 
NamedExtension    
出现在:
NamedExtension 将昵称与扩展信息关联起来。
| 字段 | 描述 | 
|---|---|
| name[必需]string | 
 | 
| extension[必需]k8s.io/apimachinery/pkg/runtime.RawExtension | 
 | 
Preferences    
出现在:
| 字段 | 描述 | 
|---|---|
| colorsbool | 是否采用彩色字符编码。 | 
| extensions[]NamedExtension | 
 |