# Easiest way with dns?

**URL:** <https://forums.suse.com/t/easiest-way-with-dns/19690>\
**Category:** General\
**Created:** [March 4, 2021, 1:45pm UTC](https://forums.suse.com/t/easiest-way-with-dns/19690 "2021-03-04T13:45:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![asp](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@asp](https://forums.suse.com/u/asp)\
**Post date:** [March 4, 2021, 1:45pm UTC](https://forums.suse.com/t/easiest-way-with-dns/19690/1 "2021-03-04T13:45:56Z")

</div>

Hi,

I have setup rancher with rke2 cluster on premise on bare metal. When I deploy ingresses and services I want to reach them from outside the cluster via dns name.

Our datacenter can forward dns requests for the kubernetes subdomain to a dns server which runs inside kubernetes.

What is best practice to easily achieve this? Can you point to a tutorial?`

Thanks, Andreas

---

<div class="post-metadata">

**Author:** ![rprengel](https://avatars.discourse-cdn.com/v4/letter/r/bbce88/32.png) [@rprengel](https://forums.suse.com/u/rprengel)\
**Post date:** [March 5, 2021, 12:06pm UTC](https://forums.suse.com/t/easiest-way-with-dns/19690/2 "2021-03-05T12:06:49Z")

</div>

+1  
a tutorial would be great

---

<div class="post-metadata">

**Author:** ![modir](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/modir/32/6408_2.png) [@modir](https://forums.suse.com/u/modir)\
**Post date:** [March 10, 2021, 1:58pm UTC](https://forums.suse.com/t/easiest-way-with-dns/19690/3 "2021-03-10T13:58:58Z")

</div>

I can not tell what the best practice is but I can tell you what we did. We forwarded the port 53 to the coredns on kubernetes. Then we created on the main dns zone a delegated sub-zone with the name [kube.client.com](http://kube.client.com). Then we added the the coredns plugin [k8s\_external](https://coredns.io/plugins/k8s_external/) with the config line

```auto
k8s_external kube.client.com

```

And then we created the service objects as described on the link. You will then get service dns names which look like this: [servicename.servicenamespace.kube.client.com](http://servicename.servicenamespace.kube.client.com)
