【问题标题】:How to use customise DNS along with cluster.local for kubernetes如何将自定义 DNS 与 cluster.local 一起用于 kubernetes
【发布时间】:2019-12-27 09:27:59
【问题描述】:

我们如何为服务和 Pod 使用自定义的内部 DNS?即与cluster.local 一起,我希望使用my-domain.local。

例如,my-svc.my-namespace.svc.cluster.local 和 my-svc.my-namespace.svc.my-doamin.local 都需要解析为相同。

【问题讨论】:

标签: kubernetes kubectl coredns


【解决方案1】:

您不能像这样添加您的自定义域,但您可以使用入口将流量从您的域路由到使用基于名称的虚拟主机的服务。

foo.bar.com --|                 |-> foo.bar.com service1:80
              | 178.91.123.132  |
bar.foo.com --|                 |-> bar.foo.com service2:80

https://kubernetes.io/docs/concepts/services-networking/ingress/#name-based-virtual-hosting

【讨论】:

    猜你喜欢
    • 2019-06-28
    • 1970-01-01
    • 1970-01-01
    • 2015-04-16
    • 2017-11-09
    • 2021-05-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多