Merge pull request #44270 from windsonsea/v1beta3

[zh] Update kubeadm-config.v1beta3.md
pull/44567/head
Kubernetes Prow Robot 2024-01-04 14:47:26 +01:00 committed by GitHub
commit 68a2bc7f7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 82 additions and 103 deletions

View File

@ -3,7 +3,6 @@ title: kubeadm 配置 (v1beta3)
content_type: tool-reference content_type: tool-reference
package: kubeadm.k8s.io/v1beta3 package: kubeadm.k8s.io/v1beta3
--- ---
<!-- <!--
title: kubeadm Configuration (v1beta3) title: kubeadm Configuration (v1beta3)
content_type: tool-reference content_type: tool-reference
@ -19,7 +18,7 @@ This version improves on the v1beta2 format by fixing some minor issues and addi
--> -->
<h2>概述</h2> <h2>概述</h2>
<p>包 v1beta3 定义 kubeadm 配置文件格式的 v1beta3 版本 <p>v1beta3 包定义 v1beta3 版本的 kubeadm 配置文件格式
此版本改进了 v1beta2 的格式,修复了一些小问题并添加了一些新的字段。</p> 此版本改进了 v1beta2 的格式,修复了一些小问题并添加了一些新的字段。</p>
<p>从 v1beta2 版本以来的变更列表:</p> <p>从 v1beta2 版本以来的变更列表:</p>
@ -37,13 +36,13 @@ a list of phases during kubeadm init/join command execution.</li>
--> -->
<ul> <ul>
<li>已弃用的字段 &quot;ClusterConfiguration.useHyperKubeImage&quot; 现在被移除。 <li>已弃用的字段 &quot;ClusterConfiguration.useHyperKubeImage&quot; 现在被移除。
kubeadm 不再支持 hyperkube 镜像。</li> kubeadm 不再支持 hyperkube 镜像。</li>
<li>字段 &quot;ClusterConfiguration.dns.type&quot; 已经被移除,因为 CoreDNS 是 kubeadm 所支持 <li>&quot;ClusterConfiguration.dns.type&quot; 字段已经被移除,因为 CoreDNS 是
的唯一 DNS 服务器类型。</li> kubeadm 所支持的唯一 DNS 服务器类型。</li>
<li>保存私密信息的字段现在包含了 &quot;datapolicy&quot; 标记tag <li>保存 Secret 信息的字段现在包含了 &quot;datapolicy&quot; 标记tag
这一标记会导致 API 结构通过 klog 打印输出时,会忽略这些字段的值。</li> 这一标记会导致 API 结构通过 klog 打印输出时,会忽略这些字段的值。</li>
<li>添加了 &quot;InitConfiguration.skipPhases&quot;, &quot;JoinConfiguration.skipPhases&quot; <li>添加了 &quot;InitConfiguration.skipPhases&quot;&quot;JoinConfiguration.skipPhases&quot;
以允许在执行 kubeadm init/join 命令时略过某些阶段。</li> 以允许在执行 <code>kubeadm init/join</code> 命令时略过某些阶段。</li>
<!-- <!--
<li>Add &quot;InitConfiguration.NodeRegistration.ImagePullPolicy&quot; and &quot;JoinConfiguration.NodeRegistration.ImagePullPolicy&quot; <li>Add &quot;InitConfiguration.NodeRegistration.ImagePullPolicy&quot; and &quot;JoinConfiguration.NodeRegistration.ImagePullPolicy&quot;
to allow specifying the images pull policy during kubeadm &quot;init&quot; and &quot;join&quot;. to allow specifying the images pull policy during kubeadm &quot;init&quot; and &quot;join&quot;.
@ -56,10 +55,10 @@ the user to configure a directory from which to take patches for components depl
--> -->
<li>添加了 &quot;InitConfiguration.nodeRegistration.imagePullPolicy&quot; <li>添加了 &quot;InitConfiguration.nodeRegistration.imagePullPolicy&quot;
&quot;JoinConfiguration.nodeRegistration.imagePullPolicy&quot; &quot;JoinConfiguration.nodeRegistration.imagePullPolicy&quot;
以允许在 kubeadm init 和 kubeadm join 期间指定镜像拉取策略。 以允许在 <code>kubeadm init</code><code>kubeadm join</code> 期间指定镜像拉取策略。
这两个字段的值必须是 &quot;Always&quot;&quot;Never&quot;&quot;IfNotPresent&quot 之一。 这两个字段的值必须是 &quot;Always&quot;&quot;Never&quot;&quot;IfNotPresent&quot 之一。
默认值是 &quot;IfNotPresent&quot;,也是添加此字段之前的默认行为。</li> 默认值是 &quot;IfNotPresent&quot;,也是添加此字段之前的默认行为。</li>
<li>添加了 &quot;InitConfiguration.patches.directory&quot;, <li>添加了 &quot;InitConfiguration.patches.directory&quot;
&quot;JoinConfiguration.patches.directory&quot; 以允许用户配置一个目录, &quot;JoinConfiguration.patches.directory&quot; 以允许用户配置一个目录,
kubeadm 将从该目录中提取组件的补丁包。</li> kubeadm 将从该目录中提取组件的补丁包。</li>
<li>BootstrapToken* API 和相关的工具被从 &quot;kubeadm&quot; API 组中移出, <li>BootstrapToken* API 和相关的工具被从 &quot;kubeadm&quot; API 组中移出,
@ -76,8 +75,7 @@ BootstrapToken* 结构。</li>
<p>从老的 kubeadm 配置版本迁移:</p> <p>从老的 kubeadm 配置版本迁移:</p>
<ul> <ul>
<li>kubeadm v1.15.x 及更新的版本可以用来从 v1beta1 迁移到 v1beta2 版本;</li> <li>kubeadm v1.15.x 及更新的版本可以用来从 v1beta1 迁移到 v1beta2 版本;</li>
<li>kubeadm v1.22.x 及更新的版本不再支持 v1beta1 和更老的 API但可以用来 <li>kubeadm v1.22.x 及更新的版本不再支持 v1beta1 和更老的 API但可以用来从 v1beta2 迁移到 v1beta3。</li>
从 v1beta2 迁移到 v1beta3。</li>
</ul> </ul>
<!-- <!--
@ -91,8 +89,7 @@ the most common/simple use case are supported with this approach.</p>
<h2>基础知识</h2> <h2>基础知识</h2>
<p>配置 kubeadm 的推荐方式是使用 <code>--config</code> 选项向其传递一个 YAML 配置文件。 <p>配置 kubeadm 的推荐方式是使用 <code>--config</code> 选项向其传递一个 YAML 配置文件。
kubeadm 配置文件中定义的某些配置选项也可以作为命令行标志来使用,不过这种 kubeadm 配置文件中定义的某些配置选项也可以作为命令行标志来使用,不过这种方法所支持的都是一些最常见的、最简单的使用场景。</p>
方法所支持的都是一些最常见的、最简单的使用场景。</p>
<p>一个 kubeadm 配置文件中可以包含多个配置类型,使用三根横线(<code>---</code>)作为分隔符。</p> <p>一个 kubeadm 配置文件中可以包含多个配置类型,使用三根横线(<code>---</code>)作为分隔符。</p>
@ -114,7 +111,6 @@ kubeadm 配置文件中定义的某些配置选项也可以作为命令行标志
</span><span style="color:#bbb"></span><span style="color:#000;font-weight:bold">kind</span>:<span style="color:#bbb"> </span>JoinConfiguration<span style="color:#bbb"> </span><span style="color:#bbb"></span><span style="color:#000;font-weight:bold">kind</span>:<span style="color:#bbb"> </span>JoinConfiguration<span style="color:#bbb">
</span></pre> </span></pre>
<!-- <!--
<p>To print the defaults for &quot;init&quot; and &quot;join&quot; actions use the following commands:</p> <p>To print the defaults for &quot;init&quot; and &quot;join&quot; actions use the following commands:</p>
<pre style="background-color:#fff">kubeadm config print init-defaults <pre style="background-color:#fff">kubeadm config print init-defaults
@ -152,8 +148,7 @@ ignore those types and print a warning.</p>
<p>用户总是可以重载默认配置值,唯一的例外是一小部分与安全性相关联的配置 <p>用户总是可以重载默认配置值,唯一的例外是一小部分与安全性相关联的配置
(例如在 API 服务器上强制实施 Node 和 RBAC 鉴权模式)。</p> (例如在 API 服务器上强制实施 Node 和 RBAC 鉴权模式)。</p>
<p>如果用户所提供的配置类型并非你所执行的操作需要的kubeadm 会忽略这些配置类型 <p>如果用户所提供的配置类型并非你所执行的操作需要的kubeadm 会忽略这些配置类型并打印警告信息。</p>
并打印警告信息。</p>
<!-- <!--
<h2>Kubeadm init configuration types</h2> <h2>Kubeadm init configuration types</h2>
@ -190,14 +185,14 @@ node only (e.g. the node ip).</p>
<p>LocalAPIEndpoint, that represents the endpoint of the instance of the API server to be deployed on this node; <p>LocalAPIEndpoint, that represents the endpoint of the instance of the API server to be deployed on this node;
use it e.g. to customize the API server advertise address.</p> use it e.g. to customize the API server advertise address.</p>
--> -->
<p>类型 InitConfiguration 用来配置运行时设置,就 kubeadm init 命令而言,包括 <p>类型 InitConfiguration 用来配置运行时设置,就 <code>kubeadm init</code> 命令而言,
启动引导令牌以及所有与 kubeadm 所在节点相关的设置,包括:</p> 包括启动引导令牌以及所有与 kubeadm 所在节点相关的设置,包括:</p>
<ul> <ul>
<li>nodeRegistration其中包含与向集群注册新节点相关的字段使用这个类型来 <li>nodeRegistration其中包含与向集群注册新节点相关的字段
定制节点名称、要使用的 CRI 套接字或者其他仅对当前节点起作用的设置 使用这个类型来定制节点名称、要使用的 CRI 套接字或者其他仅对当前节点起作用的设置
(例如节点 IP 地址)。</li> (例如节点 IP 地址)。</li>
<li>localAPIEndpoint代表的是要部署到此节点上的 API 服务器例的端点; <li>localAPIEndpoint代表的是要部署到此节点上的 API 服务器例的端点;
使用这个类型可以完成定制 API 服务器公告地址这类操作。</li> 使用这个类型可以完成定制 API 服务器公告地址这类操作。</li>
</ul> </ul>
@ -227,8 +222,8 @@ Pod subnet or services subnet.</p>
<p>类型 <code>ClusterConfiguration</code> 用来定制集群范围的设置,具体包括以下设置:</p> <p>类型 <code>ClusterConfiguration</code> 用来定制集群范围的设置,具体包括以下设置:</p>
<ul> <ul>
<li><p><code>networking</code>:其中包含集群的网络拓扑配置。使用这一部分可以定制 Pod <li><p><code>networking</code>:其中包含集群的网络拓扑配置。使用这一部分可以定制 Pod
子网或者 Service 的子网。</p> 子网或者 Service 的子网。</p>
</li> </li>
<!-- <!--
<li> <li>
@ -240,8 +235,8 @@ for using an external etcd cluster.</p>
components by adding customized setting or overriding kubeadm default settings.</p> components by adding customized setting or overriding kubeadm default settings.</p>
--> -->
<li> <li>
<p><code>etcd</code>etcd 数据库的配置。例如使用这个部分可以定制本地 etcd 或者配置 API 服务器 <p><code>etcd</code>etcd 数据库的配置。例如使用这个部分可以定制本地 etcd 或者配置 API
使用一个外部的 etcd 集群。</p> 服务器使用一个外部的 etcd 集群。</p>
</li> </li>
<li> <li>
<p><code>kube-apiserver</code><code>kube-scheduler</code><code>kube-controller-manager</code> <p><code>kube-apiserver</code><code>kube-scheduler</code><code>kube-controller-manager</code>
@ -261,11 +256,11 @@ deployed in the cluster. If this object is not provided or provided only partial
https://pkg.go.dev/k8s.io/kube-proxy/config/v1alpha1#KubeProxyConfiguration https://pkg.go.dev/k8s.io/kube-proxy/config/v1alpha1#KubeProxyConfiguration
for kube-proxy official documentation.</p> for kube-proxy official documentation.</p>
--> -->
<p>KubeProxyConfiguration 类型用来更改传递给在集群中部署的 kube-proxy 实例 <p>KubeProxyConfiguration 类型用来更改传递给在集群中部署的 kube-proxy 实例的配置。
的配置。如果此对象没有提供或者仅部分提供kubeadm 使用默认值。</p> 如果此对象没有提供或者仅部分提供kubeadm 使用默认值。</p>
<p>关于 kube-proxy 的官方文档,可参阅 <p>关于 kube-proxy 的官方文档,可参阅
https://kubernetes.io/zh/docs/reference/command-line-tools-reference/kube-proxy/ https://kubernetes.io/zh-cn/docs/reference/command-line-tools-reference/kube-proxy/
或者 https://pkg.go.dev/k8s.io/kube-proxy/config/v1alpha1#KubeProxyConfiguration。 或者 https://pkg.go.dev/k8s.io/kube-proxy/config/v1alpha1#KubeProxyConfiguration。
</p> </p>
@ -287,7 +282,7 @@ configuration types to be used during a <code>kubeadm init</code> run.</p>
如果此对象没有提供或者仅部分提供kubeadm 使用默认值。</p> 如果此对象没有提供或者仅部分提供kubeadm 使用默认值。</p>
<p>关于 kubelet 的官方文档,可参阅 <p>关于 kubelet 的官方文档,可参阅
https://kubernetes.io/zh/docs/reference/command-line-tools-reference/kubelet/ https://kubernetes.io/zh-cn/docs/reference/command-line-tools-reference/kubelet/
或者 或者
https://pkg.go.dev/k8s.io/kubelet/config/v1beta1#KubeletConfiguration。</p> https://pkg.go.dev/k8s.io/kubelet/config/v1beta1#KubeletConfiguration。</p>
@ -401,9 +396,9 @@ https://pkg.go.dev/k8s.io/kubelet/config/v1beta1#KubeletConfiguration。</p>
<h2>Kubeadm join configuration types</h2> <h2>Kubeadm join configuration types</h2>
<p>When executing <code>kubeadm join</code> with the <code>--config</code> option, the JoinConfiguration type should be provided.</p> <p>When executing <code>kubeadm join</code> with the <code>--config</code> option, the JoinConfiguration type should be provided.</p>
--> -->
<h2> kubeadm join 配置类型</h2> <h2>kubeadm join 配置类型</h2>
<p>带有 <code>--config</code> 选项执行 <code>kubeadm join</code> 操作时, <p>使用 <code>--config</code> 选项执行 <code>kubeadm join</code> 命令时,
需要提供 JoinConfiguration 类型。</p> 需要提供 JoinConfiguration 类型。</p>
<pre style="background-color:#fff"><span style="color:#000;font-weight:bold">apiVersion</span>:<span style="color:#bbb"> </span>kubeadm.k8s.io/v1beta3<span style="color:#bbb"> <pre style="background-color:#fff"><span style="color:#000;font-weight:bold">apiVersion</span>:<span style="color:#bbb"> </span>kubeadm.k8s.io/v1beta3<span style="color:#bbb">
@ -426,8 +421,8 @@ node only (e.g. the node ip).</p>
</li> </li>
</ul> </ul>
--> -->
<p>JoinConfiguration 类型用来配置运行时设置,就 <code>kubeadm join</code> 而言包括 <p>JoinConfiguration 类型用来配置运行时设置,就 <code>kubeadm join</code>
用来访问集群信息的发现方法,以及所有特定于 kubeadm 执行所在节点的设置,包括:</p> 而言包括用来访问集群信息的发现方法,以及所有特定于 kubeadm 执行所在节点的设置,包括:</p>
<ul> <ul>
<li><code>nodeRegistration</code>:其中包含向集群注册新节点相关的配置字段; <li><code>nodeRegistration</code>:其中包含向集群注册新节点相关的配置字段;
@ -458,7 +453,7 @@ node only (e.g. the node ip).</p>
<!-- <!--
BootstrapToken describes one bootstrap token, stored as a Secret in the cluster BootstrapToken describes one bootstrap token, stored as a Secret in the cluster
--> -->
<p>BootstrapToken 描述的是一个启动引导令牌,以 Secret 形式存储在集群中。</p> <p><code>BootstrapToken</code> 描述的是一个启动引导令牌,以 Secret 形式存储在集群中。</p>
<table class="table"> <table class="table">
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead> <thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
@ -484,7 +479,7 @@ Used for joining nodes in the cluster.
<code>description</code> sets a human-friendly message why this token exists and what it's used <code>description</code> sets a human-friendly message why this token exists and what it's used
for, so other administrators can know its purpose. for, so other administrators can know its purpose.
--> -->
<p><code>description</code> 设置一个对友好的消息, <p><code>description</code> 设置一个对用户友好的消息,
说明为什么此令牌会存在以及其目标用途,这样其他管理员能够知道其目的。</p> 说明为什么此令牌会存在以及其目标用途,这样其他管理员能够知道其目的。</p>
</td> </td>
</tr> </tr>
@ -556,7 +551,7 @@ of view and as an authentication method for the node in the bootstrap phase of
--> -->
<p>BootstrapTokenString 形式为 <code>abcdef.abcdef0123456789</code> 的一个令牌, <p>BootstrapTokenString 形式为 <code>abcdef.abcdef0123456789</code> 的一个令牌,
用来从加入集群的节点角度验证 API 服务器的身份,或者 &quot;kubeadm join&quot; 用来从加入集群的节点角度验证 API 服务器的身份,或者 &quot;kubeadm join&quot;
在节点启动引导作为一种身份认证方法。 在节点启动引导作为一种身份认证方法。
此令牌的生命期是短暂的,并且应该如此。</p> 此令牌的生命期是短暂的,并且应该如此。</p>
<table class="table"> <table class="table">
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead> <thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
@ -567,7 +562,7 @@ of view and as an authentication method for the node in the bootstrap phase of
</td> </td>
<td> <td>
<!--span class="text-muted">No description provided.</span--> <!--span class="text-muted">No description provided.</span-->
<span class="text-muted">无描述</span> <span class="text-muted">令牌的 ID</span>
</td> </td>
</tr> </tr>
<tr><td><code>-</code> <B><!--[Required]-->[必需]</B><br/> <tr><td><code>-</code> <B><!--[Required]-->[必需]</B><br/>
@ -575,7 +570,7 @@ of view and as an authentication method for the node in the bootstrap phase of
</td> </td>
<td> <td>
<!--span class="text-muted">No description provided.</span--> <!--span class="text-muted">No description provided.</span-->
<span class="text-muted">无描述</span> <span class="text-muted">令牌的私密数据</span>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@ -586,7 +581,7 @@ of view and as an authentication method for the node in the bootstrap phase of
<!-- <!--
<p>ClusterConfiguration contains cluster-wide configuration for a kubeadm cluster</p> <p>ClusterConfiguration contains cluster-wide configuration for a kubeadm cluster</p>
--> -->
<p>ClusterConfiguration 包含一个 kubadm 集群的集群范围配置信息。</p> <p>ClusterConfiguration 包含一个 kubeadm 集群的集群范围配置信息。</p>
<table class="table"> <table class="table">
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead> <thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
@ -638,8 +633,7 @@ the <code>bindPort</code> is used.
Possible usages are:</p> Possible usages are:</p>
--> -->
<p><code>controlPlaneEndpoint</code> 为控制面设置一个稳定的 IP 地址或 DNS 名称。 <p><code>controlPlaneEndpoint</code> 为控制面设置一个稳定的 IP 地址或 DNS 名称。
取值可以是一个合法的 IP 地址或者 RFC-1123 形式的 DNS 子域名,二者均可以带一个 取值可以是一个合法的 IP 地址或者 RFC-1123 形式的 DNS 子域名,二者均可以带一个可选的 TCP 端口号。
可选的 TCP 端口号。
如果 <code>controlPlaneEndpoint</code> 未设置,则使用 <code>advertiseAddress<code> 如果 <code>controlPlaneEndpoint</code> 未设置,则使用 <code>advertiseAddress<code>
+ <code>bindPort</code> + <code>bindPort</code>
如果设置了 <code>controlPlaneEndpoint</code>,但未指定 TCP 端口号,则使用 如果设置了 <code>controlPlaneEndpoint</code>,但未指定 TCP 端口号,则使用
@ -655,10 +649,8 @@ be used for assigning a stable DNS to the control plane.</li>
</ul> </ul>
--> -->
<ul> <ul>
<li>在一个包含不止一个控制面实例的集群中,该字段应该设置为放置在控制面 <li>在一个包含不止一个控制面实例的集群中,该字段应该设置为放置在控制面实例前面的外部负载均衡器的地址。</li>
实例之前的外部负载均衡器的地址。</li> <li>在带有强制性节点回收的环境中,<code>controlPlaneEndpoint</code> 可以用来为控制面设置一个稳定的 DNS。</li>
<li>在带有强制性节点回收的环境中,<code>controlPlaneEndpoint</code> 可以用来
为控制面设置一个稳定的 DNS。</li>
</ul> </ul>
</td> </td>
</tr> </tr>
@ -725,7 +717,7 @@ and for kube-proxy, while <code>registry.k8s.io</code> will be used for all the
--> -->
<p><code>imageRepository</code> 设置用来拉取镜像的容器仓库。 <p><code>imageRepository</code> 设置用来拉取镜像的容器仓库。
如果此字段为空,默认使用 <code>registry.k8s.io</code> 如果此字段为空,默认使用 <code>registry.k8s.io</code>
当 Kubernetes 用来执行 CI 构Kubernetes 版本以 <code>ci/</code> 开头), 当 Kubernetes 用来执行 CI 构Kubernetes 版本以 <code>ci/</code> 开头),
将默认使用 <code>gcr.io/k8s-staging-ci-images</code> 来拉取控制面组件镜像, 将默认使用 <code>gcr.io/k8s-staging-ci-images</code> 来拉取控制面组件镜像,
而使用 <code>registry.k8s.io</code> 来拉取所有其他镜像。</p> 而使用 <code>registry.k8s.io</code> 来拉取所有其他镜像。</p>
</td> </td>
@ -784,9 +776,8 @@ that is used by <code>kubeadm upgrade</code> for instance. These fields must be
This information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature</p> This information IS NOT uploaded to the kubeadm cluster configmap, partly because of its sensitive nature</p>
--> -->
<p><code>bootstrapTokens</code><code>kubeadm init</code> 执行时会被用到, <p><code>bootstrapTokens</code><code>kubeadm init</code> 执行时会被用到,
其中描述了一组要创建的启动引导令牌Bootstrap Tokens 其中描述了一组要创建的启动引导令牌Bootstrap Tokens。这里的信息不会被上传到 kubeadm
这里的信息不会被上传到 kubeadm 在集群中保存的 ConfigMap 中,部分原因是由于信息 在集群中保存的 ConfigMap 中,部分原因是由于信息本身比较敏感。</p>
本身比较敏感。</p>
</td> </td>
</tr> </tr>
<tr><td><code>nodeRegistration</code><br/> <tr><td><code>nodeRegistration</code><br/>
@ -813,10 +804,9 @@ This configuration object lets you customize what IP/DNS name and port the local
advertises it's accessible on. By default, kubeadm tries to auto-detect the IP of the default advertises it's accessible on. By default, kubeadm tries to auto-detect the IP of the default
interface and use that, but in case that process fails you may set the desired value here.</p> interface and use that, but in case that process fails you may set the desired value here.</p>
--> -->
<p><code>localAPIEndpoint</code> 所代表的的是在此控制面节点上要部署的 API 服务器 <p><code>localAPIEndpoint</code> 所代表的是在此控制面节点上要部署的 API 服务器的端点。
的端点。在高可用HA配置中此字段与 <code>ClusterConfiguration.controlPlaneEndpoint</code> 在高可用HA配置中此字段与 <code>ClusterConfiguration.controlPlaneEndpoint</code>
的取值不同:后者代表的是整个集群的全局端点,该端点上的请求会被负载均衡到每个 的取值不同:后者代表的是整个集群的全局端点,该端点上的请求会被负载均衡到每个 API 服务器。
API 服务器。
此配置对象允许你定制本地 API 服务器所公布的、可访问的 IP/DNS 名称和端口。 此配置对象允许你定制本地 API 服务器所公布的、可访问的 IP/DNS 名称和端口。
默认情况下kubeadm 会尝试自动检测默认接口上的 IP 并使用该地址。 默认情况下kubeadm 会尝试自动检测默认接口上的 IP 并使用该地址。
不过,如果这种检测失败,你可以在此字段中直接设置所期望的值。</p> 不过,如果这种检测失败,你可以在此字段中直接设置所期望的值。</p>
@ -830,8 +820,8 @@ API 服务器。
<p><code>certificateKey</code> sets the key with which certificates and keys are encrypted prior to being <p><code>certificateKey</code> sets the key with which certificates and keys are encrypted prior to being
uploaded in a Secret in the cluster during the <code>uploadcerts init</code> phase.</p> uploaded in a Secret in the cluster during the <code>uploadcerts init</code> phase.</p>
--> -->
<p><code>certificateKey</code> 用来设置一个秘钥,该秘钥将对 <code>uploadcerts init</code> <p><code>certificateKey</code> 用来设置一个密钥,该密钥将对 <code>uploadcerts init</code>
阶段上传到集群中某 Secret 内的钥和证书加密。</p> 阶段上传到集群中某 Secret 内的钥和证书加密。</p>
</td> </td>
</tr> </tr>
<tr><td><code>skipPhases</code><br/> <tr><td><code>skipPhases</code><br/>
@ -856,8 +846,8 @@ The flag &quot;--skip-phases&quot; takes precedence over this field.</p>
<p><code>patches</code> contains options related to applying patches to components deployed by kubeadm during <p><code>patches</code> contains options related to applying patches to components deployed by kubeadm during
<code>kubeadm init</code>.</p> <code>kubeadm init</code>.</p>
--> -->
<p><code>patches</code> 包含与 <code>kubeadm init</code> 阶段 kubeadm 所部署 <p><code>patches</code> 包含与 <code>kubeadm init</code> 阶段 kubeadm
的组件上要应用的补丁相关的信息。</p> 所部署的组件上要应用的补丁相关的信息。</p>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@ -902,8 +892,8 @@ control-plane node to the cluster.
comunications between a node and the control-plane. comunications between a node and the control-plane.
Defaults to &quot;/etc/kubernetes/pki/ca.crt&quot;. Defaults to &quot;/etc/kubernetes/pki/ca.crt&quot;.
--> -->
<code>caCertPath</code> 是指向 SSL 证书机构的路径,该证书包用来加密 <code>caCertPath</code> 是指向 SSL 证书机构的路径,该证书包用来加密节点与控制面之间的通信。
节点与控制面之间的通信。默认值为 &quot;/etc/kubernetes/pki/ca.crt&quot; 默认值为 &quot;/etc/kubernetes/pki/ca.crt&quot;
</p> </p>
</td> </td>
</tr> </tr>
@ -929,8 +919,8 @@ bootstrap process.
<code>controlPlane</code> defines the additional control plane instance to be deployed <code>controlPlane</code> defines the additional control plane instance to be deployed
on the joining node. If nil, no additional control plane instance will be deployed. on the joining node. If nil, no additional control plane instance will be deployed.
--> -->
<code>controlPlane</code> 定义要在正被加入到集群中的节点上部署的额外 <code>controlPlane</code> 定义要在正被加入到集群中的节点上部署的额外控制面实例。
控制面实例。此字段为 null 时,不会再上面部署额外的控制面实例。 此字段为 null 时,不会在上面部署额外的控制面实例。
</p> </p>
</td> </td>
</tr> </tr>
@ -958,8 +948,7 @@ The flag <code>--skip-phases</code> takes precedence over this field.
<code>patches</code> contains options related to applying patches to components deployed <code>patches</code> contains options related to applying patches to components deployed
by kubeadm during <code>kubeadm join</code>. by kubeadm during <code>kubeadm join</code>.
--> -->
此字段包含 <code>kubeadm join</code> 阶段向 kubeadm 所部署的组件打补丁 此字段包含 <code>kubeadm join</code> 阶段向 kubeadm 所部署的组件打补丁的选项。
的选项。
</p> </p>
</td> </td>
</tr> </tr>
@ -974,7 +963,6 @@ by kubeadm during <code>kubeadm join</code>.
**出现在:** **出现在:**
- [InitConfiguration](#kubeadm-k8s-io-v1beta3-InitConfiguration) - [InitConfiguration](#kubeadm-k8s-io-v1beta3-InitConfiguration)
- [JoinControlPlane](#kubeadm-k8s-io-v1beta3-JoinControlPlane) - [JoinControlPlane](#kubeadm-k8s-io-v1beta3-JoinControlPlane)
<p> <p>
@ -1056,7 +1044,7 @@ APIServer 包含集群中 API 服务器部署所必需的设置。
<!-- <!--
<code>certSANs</code> sets extra Subject Alternative Names (SANs) for the API Server signing certificate. <code>certSANs</code> sets extra Subject Alternative Names (SANs) for the API Server signing certificate.
--> -->
<code>certSANs</code> 设置 API 服务器签署证书所用的额外主替代名Subject Alternative NameSAN <code>certSANs</code> 设置 API 服务器签署证书所用的额外主替代名Subject Alternative NameSAN
</p> </p>
</td> </td>
</tr> </tr>
@ -1154,8 +1142,8 @@ object in DER-encoded ASN.1. These hashes can be calculated using, for example,
via <code>caCertHashes</code>. This can weaken the security of kubeadm since other nodes can via <code>caCertHashes</code>. This can weaken the security of kubeadm since other nodes can
impersonate the control-plane. impersonate the control-plane.
--> -->
<code>unsafeSkipCAVerification</code> 允许在使用基于令牌的服务发现时 <code>unsafeSkipCAVerification</code> 允许在使用基于令牌的服务发现时不使用
不使用 <code>caCertHashes</code> 来执行 CA 验证。这会弱化 kubeadm 的安全性, <code>caCertHashes</code> 来执行 CA 验证。这会弱化 kubeadm 的安全性,
因为其他节点可以伪装成控制面。 因为其他节点可以伪装成控制面。
</p> </p>
</td> </td>
@ -1242,7 +1230,7 @@ DNS defines the DNS addon that should be used in the cluster
<!-- <!--
<code>imageMeta</code> allows to customize the image used for the DNS component. <code>imageMeta</code> allows to customize the image used for the DNS component.
--> -->
<code>imageMeta</code> 允许对 DNS 组件所使用的镜像作定制。 <code>imageMeta</code> 允许对 DNS 组件所使用的镜像作定制。
</p> </p>
</td> </td>
</tr> </tr>
@ -1291,8 +1279,7 @@ Discovery specifies the options for the kubelet to use during the TLS Bootstrap
cluster information. cluster information.
<code>bootstrapToken</code> and <code>file</code> are mutually exclusive. <code>bootstrapToken</code> and <code>file</code> are mutually exclusive.
--> -->
<code> 用来设置一个文件或者 URL 路径,指向一个 kubeconfig 文件;该配置文件 <code> 用来设置一个文件或者 URL 路径,指向一个 kubeconfig 文件;该配置文件中包含集群信息。
中包含集群信息。
<code>bootstrapToken</code><code>file</code> 是互斥的。 <code>bootstrapToken</code><code>file</code> 是互斥的。
</p> </p>
</td> </td>
@ -1310,8 +1297,7 @@ does not contain any other authentication information
--> -->
<code>tlsBootstrapToken</code> 是 TLS 启动引导过程中使用的令牌。 <code>tlsBootstrapToken</code> 是 TLS 启动引导过程中使用的令牌。
如果设置了 <code>bootstrapToken</code>,则此字段默认值为 <code>.bootstrapToken.token</code>,不过可以被重载。 如果设置了 <code>bootstrapToken</code>,则此字段默认值为 <code>.bootstrapToken.token</code>,不过可以被重载。
如果设置了 <code>file</code>,此字段<strong>必须被设置</strong>,以防 kubeconfig 文件 如果设置了 <code>file</code>,此字段<strong>必须被设置</strong>,以防 kubeconfig 文件中不包含其他身份认证信息。
中不包含其他身份认证信息。
</p> </p>
</td> </td>
</tr> </tr>
@ -1442,7 +1428,7 @@ Required if using a TLS connection.</p>
<p><code>keyFile</code> is an SSL key file used to secure etcd communication. <p><code>keyFile</code> is an SSL key file used to secure etcd communication.
Required if using a TLS connection.</p> Required if using a TLS connection.</p>
--> -->
<p><code>keyFile</code> 是一个用来加密 etcd 通信的 SSL 钥文件。 <p><code>keyFile</code> 是一个用来加密 etcd 通信的 SSL 钥文件。
此字段在使用 TLS 连接时为必填字段。</p> 此字段在使用 TLS 连接时为必填字段。</p>
</td> </td>
</tr> </tr>
@ -1462,8 +1448,8 @@ Required if using a TLS connection.</p>
<p>FileDiscovery is used to specify a file or URL to a kubeconfig file from which to load <p>FileDiscovery is used to specify a file or URL to a kubeconfig file from which to load
cluster information.</p> cluster information.</p>
--> -->
<p>FileDiscovery 用来指定一个文件或者 URL 路径,指向一个 kubeconfig 文件;该配置文件 <p>FileDiscovery 用来指定一个文件或者 URL 路径,指向一个 kubeconfig 文件;
可用来加载集群信息。</p> 该配置文件可用来加载集群信息。</p>
<table class="table"> <table class="table">
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead> <thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
@ -1496,7 +1482,7 @@ file from which to load cluster information.</p>
<!-- <!--
HostPathMount contains elements describing volumes that are mounted from the host. HostPathMount contains elements describing volumes that are mounted from the host.
--> -->
<p>HostPathMount 包含从宿主节点挂载的卷的信息。</p--> <p>HostPathMount 包含从主节点挂载的卷的信息。</p-->
<table class="table"> <table class="table">
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead> <thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
@ -1519,7 +1505,7 @@ HostPathMount contains elements describing volumes that are mounted from the hos
<!-- <!--
<code>hostPath</code> is the path in the host that will be mounted inside the Pod. <code>hostPath</code> is the path in the host that will be mounted inside the Pod.
--> -->
<p><code>hostPath</code> 是要在 Pod 中挂载的卷在宿主系统上的路径。</p> <p><code>hostPath</code> 是要在 Pod 中挂载的卷在主系统上的路径。</p>
</td> </td>
</tr> </tr>
<tr><td><code>mountPath</code> <B><!--[Required]-->[必需]</B><br/> <tr><td><code>mountPath</code> <B><!--[Required]-->[必需]</B><br/>
@ -1569,8 +1555,7 @@ HostPathMount contains elements describing volumes that are mounted from the hos
ImageMeta allows to customize the image used for components that are not ImageMeta allows to customize the image used for components that are not
originated from the Kubernetes/Kubernetes release process originated from the Kubernetes/Kubernetes release process
--> -->
<p>ImageMeta 用来配置来源不是 Kubernetes/kubernetes <p>ImageMeta 用来配置来源不是 Kubernetes/kubernetes 发布过程的组件所使用的镜像。</p>
发布过程的组件所使用的镜像。</p>
<table class="table"> <table class="table">
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead> <thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
@ -1617,8 +1602,7 @@ the above components during upgrades.
JoinControlPlane contains elements describing an additional control plane instance JoinControlPlane contains elements describing an additional control plane instance
to be deployed on the joining node. to be deployed on the joining node.
--> -->
<p>JoinControlPlane 包含在正在加入集群的节点上要部署的额外的控制面组件的 <p>JoinControlPlane 包含在正在加入集群的节点上要部署的额外的控制面组件的设置。</p>
设置。</p>
<table class="table"> <table class="table">
<thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead> <thead><tr><th width="30%"><!--Field-->字段</th><th><!--Description-->描述</th></tr></thead>
@ -1632,8 +1616,7 @@ to be deployed on the joining node.
<code>localAPIEndpoint</code> represents the endpoint of the API server instance to be <code>localAPIEndpoint</code> represents the endpoint of the API server instance to be
deployed on this node. deployed on this node.
--> -->
<p><code>localAPIEndpoint</code> 代表的是将在此节点上部署的 API 服务器实例 <p><code>localAPIEndpoint</code> 代表的是将在此节点上部署的 API 服务器实例的端点。</p>
的端点。</p>
</td> </td>
</tr> </tr>
<tr><td><code>certificateKey</code><br/> <tr><td><code>certificateKey</code><br/>
@ -1646,7 +1629,7 @@ they are downloaded from the secret upon joining a new control plane node.
The corresponding encryption key is in the InitConfiguration. The corresponding encryption key is in the InitConfiguration.
--> -->
<p><code>certificateKey</code> 是在添加新的控制面节点时用来解密所下载的 <p><code>certificateKey</code> 是在添加新的控制面节点时用来解密所下载的
Secret 中的证书的秘钥。对应的加密秘钥在 InitConfiguration 结构中。</p> Secret 中的证书的密钥。对应的加密密钥在 InitConfiguration 结构中。</p>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@ -1693,7 +1676,7 @@ LocalEtcd describes that kubeadm should run an etcd cluster locally
Defaults to &quot;/var/lib/etcd&quot;. Defaults to &quot;/var/lib/etcd&quot;.
--> -->
<p><code>dataDir</code> 是 etcd 用来存放数据的目录。 <p><code>dataDir</code> 是 etcd 用来存放数据的目录。
默认值为 &quot;/var/lib/etcd&quot;</p> 默认值为 &quot;/var/lib/etcd&quot;</p>
</td> </td>
</tr> </tr>
<tr><td><code>extraArgs</code><br/> <tr><td><code>extraArgs</code><br/>
@ -1706,8 +1689,7 @@ inside a static Pod. A key in this map is the flag name as it appears on the
command line except without leading dash(es). command line except without leading dash(es).
--> -->
<p><code>extraArgs</code> 是为 etcd 可执行文件提供的额外参数,用于在静态 <p><code>extraArgs</code> 是为 etcd 可执行文件提供的额外参数,用于在静态
Pod 中运行 etcd。映射中的每一个键对应命令行上的一个标志参数只是去掉了 Pod 中运行 etcd。映射中的每一个键对应命令行上的一个标志参数只是去掉了前置的连字符。</p>
前置的连字符。</p>
</td> </td>
</tr> </tr>
<tr><td><code>serverCertSANs</code><br/> <tr><td><code>serverCertSANs</code><br/>
@ -1718,8 +1700,8 @@ Pod 中运行 etcd。映射中的每一个键对应命令行上的一个标志
<code>serverCertSANs</code> sets extra Subject Alternative Names (SANs) for the etcd <code>serverCertSANs</code> sets extra Subject Alternative Names (SANs) for the etcd
server signing certificate. server signing certificate.
--> -->
<p><code>serverCertSANs</code> 为 etcd 服务器的签名证书设置额外的 <p><code>serverCertSANs</code> 为 etcd
主体替代名Subject Alternative NamesSAN</p> 服务器的签名证书设置额外的主体替代名Subject Alternative NamesSAN</p>
</td> </td>
</tr> </tr>
<tr><td><code>peerCertSANs</code><br/> <tr><td><code>peerCertSANs</code><br/>
@ -1730,8 +1712,8 @@ server signing certificate.
<code>peerCertSANs</code> sets extra Subject Alternative Names (SANs) for the etcd peer <code>peerCertSANs</code> sets extra Subject Alternative Names (SANs) for the etcd peer
signing certificate. signing certificate.
--> -->
<p><code>peerCertSANs</code> 为 etcd 的对等端签名证书设置额外的 <p><code>peerCertSANs</code> 为 etcd
主体替代名Subject Alternative NamesSAN</p> 的对等端签名证书设置额外的主体替代名Subject Alternative NamesSAN</p>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@ -1762,7 +1744,7 @@ Networking contains elements describing cluster's networking configuration
<!-- <!--
<code>serviceSubnet</code> is the subnet used by Kubernetes Services. Defaults to &quot;10.96.0.0/12&quot;. <code>serviceSubnet</code> is the subnet used by Kubernetes Services. Defaults to &quot;10.96.0.0/12&quot;.
--> -->
<p><code>serviceSubnet</code> 是 Kubernetes 服务所使用的子网。 <p><code>serviceSubnet</code> 是 Kubernetes 服务所使用的子网。
默认值为 &quot;10.96.0.0/12&quot;</p> 默认值为 &quot;10.96.0.0/12&quot;</p>
</td> </td>
</tr> </tr>
@ -1783,7 +1765,7 @@ Networking contains elements describing cluster's networking configuration
<!-- <!--
<code>dnsDomain</code> is the DNS domain used by Kubernetes Services. Defaults to &quot;cluster.local&quot;. <code>dnsDomain</code> is the DNS domain used by Kubernetes Services. Defaults to &quot;cluster.local&quot;.
--> -->
<p><code>dnsDomain</code> 是 Kubernetes 服务所使用的 DNS 域名。 <p><code>dnsDomain</code> 是 Kubernetes 服务所使用的 DNS 域名。
默认值为 &quot;cluster.local&quot;</p> 默认值为 &quot;cluster.local&quot;</p>
</td> </td>
</tr> </tr>
@ -1851,8 +1833,8 @@ If you don't want to taint your control-plane node, set this field to an empty l
i.e. <code>taints: []</code> in the YAML file. This field is solely used for Node registration. i.e. <code>taints: []</code> in the YAML file. This field is solely used for Node registration.
--> -->
<p><code>taints</code> 设定 Node API 对象被注册时要附带的污点。 <p><code>taints</code> 设定 Node API 对象被注册时要附带的污点。
若未设置此字段(即字段值为 null默认为控制面节点添加控制面污点。 若未设置此字段(即字段值为 null默认为控制面节点添加控制面污点。
如果你不想污染你的控制平面节点,可以将此字段设置为空列表(即 YAML 文件中的 <code>taints: []</code> 如果你不想为控制面节点添加污点,可以将此字段设置为空列表(即 YAML 文件中的 <code>taints: []</code>
这个字段只用于节点注册。</p> 这个字段只用于节点注册。</p>
</td> </td>
</tr> </tr>
@ -1870,11 +1852,9 @@ kubeadm is executing on. A key in this map is the flag name as it appears on the
command line except without leading dash(es). command line except without leading dash(es).
--> -->
<p><code>kubeletExtraArgs</code> 用来向 kubelet 传递额外参数。 <p><code>kubeletExtraArgs</code> 用来向 kubelet 传递额外参数。
这里的参数会通过 kubeadm 在运行时写入的、由 kubelet 来读取的环境文件来 这里的参数会通过 kubeadm 在运行时写入的、由 kubelet 来读取的环境文件来传递给 kubelet 命令行。
传递给 kubelet 命令行。
这里的设置会覆盖掉 <code>kubelet-config</code> ConfigMap 中包含的一般性的配置。 这里的设置会覆盖掉 <code>kubelet-config</code> ConfigMap 中包含的一般性的配置。
命令行标志在解析时优先级更高。 命令行标志在解析时优先级更高。这里的设置值仅作用于 kubeadm 运行所在的节点。
这里的设置值仅作用于 kubeadm 运行所在的节点。
映射中的每个键对应命令行中的一个标志参数,只是去掉了前置的连字符。</p> 映射中的每个键对应命令行中的一个标志参数,只是去掉了前置的连字符。</p>
</td> </td>
</tr> </tr>
@ -1908,9 +1888,8 @@ images if not present on the host.
--> -->
<p><code>imagePullPolicy</code> 设定 &quot;kubeadm init&quot;&quot;kubeadm join&quot; <p><code>imagePullPolicy</code> 设定 &quot;kubeadm init&quot;&quot;kubeadm join&quot;
操作期间的镜像拉取策略。此字段的取值可以是 &quot;Always&quot;&quot;IfNotPresent&quot; 操作期间的镜像拉取策略。此字段的取值可以是 &quot;Always&quot;&quot;IfNotPresent&quot;
&quot;Never&quot; 之一。 &quot;Never&quot; 之一。若此字段未设置,则 kubeadm 使用 &quot;IfNotPresent&quot; 作为其默认值,
若此字段未设置,则 kubeadm 使用 &quot;IfNotPresent&quot; 作为其默认值,换言之, 换言之,当镜像在主机上不存在时才执行拉取操作。</p>
当镜像在主机上不存在时才执行拉取操作。</p>
</td> </td>
</tr> </tr>
</tbody> </tbody>