参考

Edit This Page

概要

通过 API 服务器安装 CoreDNS 附加组件。请注意,即使 DNS 服务器已部署,在安装 CNI 之前 DNS 服务器不会被调度执行。

kubeadm init phase addon coredns [flags]

选项

<tr>
  <td colspan="2">--config string</td>
</tr>
<tr>
  <td></td><td style="line-height: 130%; word-wrap: break-word;">
  <!--
  Path to kubeadm config file.
  -->
   kubeadm 配置文件的路径。
  </td>
</tr>

<tr>
  <td colspan="2">--feature-gates string</td>
</tr>
<tr>
  <td></td><td style="line-height: 130%; word-wrap: break-word;">
  <!--
  A set of key=value pairs that describe feature gates for various features. Options are:<br/>IPv6DualStack=true|false (ALPHA - default=false)
  -->
  一组用来描述各种功能特性的键值(key=value)对。选项是:<br/>IPv6DualStack=true|false (ALPHA - 默认值=false)
  </td>
</tr>

<tr>
  <td colspan="2">-h, --help</td>
</tr>
<tr>
  <td></td><td style="line-height: 130%; word-wrap: break-word;">
  <!--
  help for coredns
  -->
   coredns 操作的帮助命令
  </td>
</tr>

<tr>
  <td colspan="2">
  <!--
  --image-repository string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: "k8s.gcr.io"
  -->
  --image-repository string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;默认值:"k8s.gcr.io"
  </td>
</tr>
<tr>
  <td></td><td style="line-height: 130%; word-wrap: break-word;">
  <!--
  Choose a container registry to pull control plane images from
  -->
  选择用于拉取控制平面镜像的容器仓库
  </td>
</tr>

<tr>
  <td colspan="2">
  <!--
  --kubeconfig string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: "/etc/kubernetes/admin.conf"
  -->
  --kubeconfig string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;默认值:"/etc/kubernetes/admin.conf"
  </td>
</tr>
<tr>
  <td></td><td style="line-height: 130%; word-wrap: break-word;">
  <!--
  The kubeconfig file to use when talking to the cluster. If the flag is not set, a set of standard locations can be searched for an existing kubeconfig file.
  -->
  与集群通信时使用的 kubeconfig 文件。如果未设置该参数,则可以在一组标准位置中搜索现有的 kubeconfig 文件。
  </td>
</tr>

<tr>
  <td colspan="2">
  <!--
  --kubernetes-version string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: "stable-1"
  -->
  --kubernetes-version string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;默认值:"stable-1"
  </td>
</tr>
<tr>
  <td></td><td style="line-height: 130%; word-wrap: break-word;">
  <!--
  Choose a specific Kubernetes version for the control plane.
  -->
  为控制平面选择特定的 Kubernetes 版本。
  </td>
</tr>

<tr>
  <td colspan="2">
  <!--
  --service-cidr string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: "10.96.0.0/12"
  -->
  --service-cidr string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;默认值:"10.96.0.0/12"
  </td>
</tr>
<tr>
  <td></td><td style="line-height: 130%; word-wrap: break-word;">
  <!--
  Use alternative range of IP address for service VIPs.
  -->
  为服务 VIP 选择 IP 地址范围。
  </td>
</tr>

<tr>
  <td colspan="2">
  <!--
  --service-dns-domain string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: "cluster.local"
  -->
  --service-dns-domain string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;默认值:"cluster.local"
  </td>
</tr>
<tr>
  <td></td><td style="line-height: 130%; word-wrap: break-word;">
  <!--
  Use alternative domain for services, e.g. "myorg.internal".
  -->
  服务使用其它的域名,例如:"myorg.internal"。
  </td>
</tr>

继承于父命令的选项

<tr>
  <td colspan="2">--rootfs string</td>
</tr>
<tr>
  <td></td><td style="line-height: 130%; word-wrap: break-word;">
  <!--
  [EXPERIMENTAL] The path to the 'real' host root filesystem.
  -->
  [实验] 到 '真实' 主机根文件系统的路径。
  </td>
</tr>

反馈