如何在外部公开Kubernetes DNS [英] How to expose Kubernetes DNS externally
问题描述
外部DNS服务器是否可以针对K8s群集DNS进行解析?我想让驻留在群集外部的应用程序能够解析容器DNS名称吗?
Is it possible for an external DNS server to resolve against the K8s cluster DNS? I want to have applications residing outside of the cluster be able to resolve the container DNS names?
推荐答案
It's possible, there's a good article proving the concept: https://blog.heptio.com/configuring-your-linux-host-to-resolve-a-local-kubernetes-clusters-service-urls-a8c7bdb212a7
但是,我同意Dan的看法,即通过service + ingress/ELB + external-dns进行公开是解决此问题的常用方法.出于开发目的,我使用 https://github.com/txn2/kubefwd 也会破解名称解析
However, I agree with Dan that exposing via service + ingress/ELB + external-dns is a common way to solve this. And for dev purposes I use https://github.com/txn2/kubefwd which also hacks name resolution.
这篇关于如何在外部公开Kubernetes DNS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!