NodeLocal DNSCache 的使用
参看此篇章前可先查看记录一次k3s网络DNS问题排查篇 参考: https://v1-24.docs.kubernetes.io/zh-cn/docs/tasks/administer-cluster/nodelocaldns/ https://www.suse.com/support/kb/doc/?id=000020174 https://stackoverflow.com/questions/70913822/kubernetes-k3s-pod-gets-enotfound-after-5-20-hours-of-airing-time https://icode.best/i/10017745505921 https://hub.docker.com/r/dyrnq/k8s-dns-node-cache/tags https://github.com/coredns/deployment/blob/master/kubernetes/Scaling_CoreDNS.md https://lework.github.io/2020/11/09/node-local-d...
K8s DNS 原理与 dnsPolicy 应用场景详解
转自: https://help.aliyun.com/document_detail/188179.html?utm_content=g_1000230851&spm=5176.20966629.toubu.3.f2991ddcpxxvD1#title-b7y-d6a-bcy DNS原理和配置说明本文介绍Kubernetes集群中集群DNS服务原理,并针对不同场景介绍如何进行DNS策略配置。 背景信息K8S集群默认部署了一套DNS服务,通过kube-dns的服务名暴露DNS服务。你可执行以下命令查看kube-dns的服务详情。 1kubectl get svc kube-dns -n kube-system 预期输出: 12NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEkube-dns ClusterIP 172.24.0.10 <none> 53/UDP,53/TCP,9153/TCP 27d K8s 部署的...
记录一次 Kubernetes 网络 DNS 问题排查过程
问题总结在 Kubernetes 环境下,服务间访问遇到多个 DNS 和网络相关问题: 问题 1:Alpine 镜像 DNS 解析失败服务使用 node:xxx-alpine 镜像,服务间访问报错:getaddrinfo EAI_AGAIN 问题 2:ClusterIP 访问超时非 Alpine 镜像,使用 ClusterIP 访问频繁出现超时问题:connect ECONNRESET、read ECONNRESET 以及 axios 的 timeout 问题 3:DNS 访问报错非 Alpine 镜像,使用 DNS 访问报错:getaddrinfo ENOTFOUND 问题 4:CoreDNS I/O 超时CoreDNS 报错:[ERROR] plugin/errors: 2 . NS: read udp 10.42.2.5:38764->183.60.82.98:53: i/o timeout 详细背景见:https://github.com/k3s-io/k3s/issues/5897 问题排查过程问题 1:Alpine 镜像 DNS 解析问题问题现象:...
nslookup 和 dig 指令
dig 和 nslookup 的安装Ubuntu、Debian: 1# apt install -y dnsutils Fedora / CentOS: 1# yum install -y bind-utils nslookup 命令详解nslookup 命令用于查询 DNS 的记录,查看域名解析是否正常,在网络故障的时候用来诊断网络问题。nslookup 的用法相对来说还是蛮简单的,主要是下面的几个用法。 直接查询查询一个域名的 A 记录: 1nslookup domain [dns-server] 如果没指定 dns-server,用系统默认的 DNS 服务器。 查询其他记录直接查询返回的是 A 记录,我们可以指定参数,查询其他记录,比如 AAAA、MX 等: 1234nslookup -qt=type domain [dns-server]nslookup -q=type domain [dns-server]nslookup -type=type domain [dns-server]nslookup -querytype=type domain [d...
