CoreDNS 是 Kubernetes 集群的默认 DNS 服务。本指南介绍如何为 CoreDNS 配置主机别名、节点选择器和容忍度。
进入 管理员 > Marketplace > 集群插件。
搜索“Alauda Build of CoreDNS”,然后点击 更新。
配置以下参数:
配置自定义 DNS 解析条目。
| Parameter | Description |
|---|---|
| IP | 需要解析的 IP 地址 |
| Domains | 域名(以空格分隔) 示例: example.com test.example.com |
指定 CoreDNS Pod 应运行的节点。
| Parameter | Description |
|---|---|
| Label Key | 用于匹配节点的标签键 |
| Label Value | 用于匹配节点的标签值 |
允许 CoreDNS Pod 调度到带有污点的节点上。
| Parameter | Description |
|---|---|
| Key | 需要容忍的污点键 |
| Value | 污点值(可选) |
| Type | NoSchedule、PreferNoSchedule 或 NoExecute |