Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does DNS access Service

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article to share with you is about DNS how to access Service, Xiaobian feel quite practical, so share to everyone to learn, I hope you can read this article after some harvest, not much to say, follow Xiaobian to see it.

In Cluster, in addition to Cluster IP access to services, Kubernetes also provides more convenient DNS access.

kubeadm deployment installs the kube-dns component by default.

kube-dns is a DNS server. Whenever a new Service is created, kube-dns adds the DNS record for that Service. Pods in a Cluster can be accessed via. Visit Service.

For example, you can use httpd-svc.default to access Service httpd-svc.

Use nslookup to view DNS information for httpd-svc.

Deploy Service httpd2-svc in kube-public, configured as follows:

View kube-public Service:

Because they belong to different namespaces, you must use httpd2-svc.kube-public to access them.

Kubernetes cluster can access the Service through Cluster IP and DNS, so how to access it outside the cluster?

The above is how DNS accesses Service. Xiaobian believes that some knowledge points may be seen or used in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report