Coder Social home page Coder Social logo

dns有问题 about kainstall HOT 3 CLOSED

jdxia avatar jdxia commented on June 7, 2024
dns有问题

from kainstall.

Comments (3)

lework avatar lework commented on June 7, 2024

你给的信息太少,可以把操作过程记录下来,这样我才了解你的问题。

from kainstall.

jdxia avatar jdxia commented on June 7, 2024

Information as of: 2021-05-04 22:06:14

Product............: Alibaba Cloud ECS pc-i440fx-2.1
OS.................: CentOS Linux release 7.8.2003 (Core)
Kernel.............: Linux 3.10.0-1127.19.1.el7.x86_64 x86_64 GNU/Linux
CPU................: Intel(R) Xeon(R) Platinum 8269CY CPU @ 2.50GHz 2P 1C 2L

Hostname...........: k8s-master-node1
IP Addresses.......: 172.16.221.206

Uptime.............: 1 days, 09h 37m 43s
Memory.............: 1.18GiB of 3.52GiB RAM used (33.42%)
Load Averages......: 0.12 / 0.29 / 0.26 with 2 core(s) at 2500.002Hz
Disk Usage.........: 6.4G of 40G disk space used (17%)

Users online.......: 1
Running Processes..: 108
Container Info.....: Exited:9 Running:6 Images:13

[root@k8s-master-node1 ~]# kubectl get svc -o wide
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
ingress-demo-app ClusterIP 10.96.20.89 80/TCP 33h app=ingress-demo-app
kubernetes ClusterIP 10.96.0.1 443/TCP 33h
[root@k8s-master-node1 ~]# nslookup kubernetes
Server: 100.100.2.136
Address: 100.100.2.136#53

** server can't find kubernetes: NXDOMAIN
[root@k8s-master-node1 ~]# kubectl logs -f -n kube-system coredns-8496bbfb78-6kqtv
.:53
[INFO] plugin/reload: Running configuration MD5 = db32ca3650231d74073ff4cf814959a7
CoreDNS-1.7.0
linux/amd64, go1.14.4, f59c03d
^C
[root@k8s-master-node1 ~]# kubectl logs -f -n kube-system coredns-8496bbfb78-cp4bx
.:53
[INFO] plugin/reload: Running configuration MD5 = db32ca3650231d74073ff4cf814959a7
CoreDNS-1.7.0
linux/amd64, go1.14.4, f59c03d
^C
[root@k8s-master-node1 ~]# kubectl get nodes -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
k8s-master-node1 Ready control-plane,master 33h v1.20.4 172.16.221.206 CentOS Linux 7 (Core) 3.10.0-1127.19.1.el7.x86_64 docker://20.10.6
k8s-master-node2 Ready control-plane,master 33h v1.20.4 172.16.221.209 CentOS Linux 7 (Core) 3.10.0-1127.19.1.el7.x86_64 docker://20.10.6
k8s-master-node3 Ready control-plane,master 33h v1.20.4 172.16.221.207 CentOS Linux 7 (Core) 3.10.0-1127.19.1.el7.x86_64 docker://20.10.6
k8s-worker-node1 Ready worker 33h v1.20.4 172.16.221.210 CentOS Linux 7 (Core) 3.10.0-1127.19.1.el7.x86_64 docker://20.10.6
k8s-worker-node2 Ready worker 33h v1.20.4 172.16.221.208 CentOS Linux 7 (Core) 3.10.0-1127.19.1.el7.x86_64 docker://20.10.6
[root@k8s-master-node1 ~]# cat /etc/resolv.conf
options timeout:2 attempts:3 rotate single-request-reopen
; generated by /usr/sbin/dhclient-script
nameserver 100.100.2.136
nameserver 100.100.2.138

from kainstall.

lework avatar lework commented on June 7, 2024

看你执行的过程,你这个是在宿主机上解析k8s的域名信息,而你宿主机配置的是外部dns,所以解析不出来。你可以在pod里面nslookup。或者你宿主机配置coredns的地址。

from kainstall.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.