In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "introduction to Service usage of Kubernetes". In daily operation, I believe many people have doubts about the introduction of Service usage of Kubernetes. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "introduction to Service usage of Kubernetes"! Next, please follow the editor to study!
To give a rough description of the problems encountered, I started a mysql container above. And want to access port 3306 of mysql through the domain name in another container. Try the ping package and find that Dns resolves the domain name successfully, but ping does not work.
In my previous article, the Ip used to access mysql is 10.233.104.69, which is also found in the mysql container. So at first it was suspected that the domain name was not written correctly.
Then found that 10.233.46.235 is the Ip,10.233.104.69 of server is the Ip of pod, continue to suspect that the domain name is written incorrectly, try to find the domain name of pod, but can not find this concept on the Internet.
By the way, check the domain name through busybox.
# cat busybox.yamlapiVersion: v1 kind: Pod metadata: name: busybox namespace: defaultspec:-name: busybox image: registry.cn-hangzhou.aliyuncs.com/yanfulei/busybox:latest command:-sleep-"3600" imagePullPolicy: IfNotPresent restartPolicy: Always# kubectl create-f busybox.yamlpod "busybox" created [root@master0 ~] # kubectl exec busybox nslookup kubernetesServer: 10.233.0.3Address 1: 10.233.0.3 kube-dns.kube-system .svc.cluster.localName: kubernetesAddress 1: 10.233.0.1 kubernetes.default.svc.cluster.local# kubectl exec busybox nslookup mysqlServer: 10.233.0.3Address 1: 10.233.0.3 kube-dns.kube-system.svc.cluster.localName: mysqlAddress 1: 10.233.46.235 mysql.default.svc.cluster.local to this The study on "introduction to Service usage of Kubernetes" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.