配置 CoreDNS

Overview

CoreDNS 是 Kubernetes 集群的默认 DNS 服务。本指南介绍如何为 CoreDNS 配置主机别名、节点选择器和容忍度。

Configuration

  1. 进入 管理员 > Marketplace > 集群插件。

  2. 搜索“Alauda Build of CoreDNS”,然后点击 更新。

  3. 配置以下参数:

Host Alias

配置自定义 DNS 解析条目。

ParameterDescription
IP需要解析的 IP 地址
Domains域名(以空格分隔)
示例:example.com test.example.com

Node Selectors

指定 CoreDNS Pod 应运行的节点。

ParameterDescription
Label Key用于匹配节点的标签键
Label Value用于匹配节点的标签值

Node Tolerations

允许 CoreDNS Pod 调度到带有污点的节点上。

ParameterDescription
Key需要容忍的污点键
Value污点值(可选)
TypeNoSchedule、PreferNoSchedule 或 NoExecute
  1. 点击 更新 以应用配置。