如何在外部公开Kubernetes DNS [英] How to expose Kubernetes DNS externally

查看:102
本文介绍了如何在外部公开Kubernetes DNS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

外部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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆