【Kubernetes】kube-dns 持续重启
kuberbetes部署和启动正常,但是kube-dns持续重启
使用命令
kubectl get pods --all-namespaces
得到结果
从图中可以看出kube-dns-c7d85897f-jmntw 在不断重启
使用命令
kubectl describe pod kube-dns-c7d85897f-jmntw -n kube-system
得到结果
Name: kube-dns-c7d85897f-jmntw
Namespace: kube-system
Node: 172.18.196.2/172.18.196.2
Start Time: Tue, Jun :: +
Labels: k8s-app=kube-dns
pod-template-hash=
Annotations: scheduler.alpha.kubernetes.io/critical-pod=
Status: Running
IP: 172.20.1.9
Controlled By: ReplicaSet/kube-dns-c7d85897f
Containers:
kubedns:
Container ID: docker://516c137ece876a83fc16d26a4fb2c526d8daa75423d1f2371b0b2142bfd2e00a
Image: mirrorgooglecontainers/k8s-dns-kube-dns-amd64:1.14.
Image ID: docker-pullable://mirrorgooglecontainers/k8s-dns-kube-dns-amd64@sha256:956ac5f14a388ab9887ae07f36e770852f3f51dcac9e0d193ce8f62cbf066b13
Ports: /UDP, /TCP, /TCP
Args:
--domain=cluster.local.
--dns-port=
--config-dir=/kube-dns-config
--v=
State: Running
Started: Tue, Jun :: +
Ready: True
Restart Count:
Limits:
memory: 170Mi
Requests:
cpu: 100m
memory: 70Mi
Liveness: http-get http://:10054/healthcheck/kubedns delay=60s timeout=5s period=10s #success=1 #failure=5
Readiness: http-get http://:8081/readiness delay=3s timeout=5s period=10s #success=1 #failure=3
Environment:
PROMETHEUS_PORT:
Mounts:
/kube-dns-config from kube-dns-config (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-dns-token-2ndrd (ro)
dnsmasq:
Container ID: docker://5871fe23f088d23dd342fa7a891be0b5b9f3f879a0902e6633baaa418b2a920f
Image: mirrorgooglecontainers/k8s-dns-dnsmasq-nanny-amd64:1.14.
Image ID: docker-pullable://mirrorgooglecontainers/k8s-dns-dnsmasq-nanny-amd64@sha256:38f69fab59a32a490c8c62b035f6aa8dbf9a320686537225adaee16a07856d17
Ports: /UDP, /TCP
Args:
-v=
-logtostderr
-configDir=/etc/k8s/dns/dnsmasq-nanny
-restartDnsmasq=true
--
-k
--cache-size=
--log-facility=-
--server=/cluster.local./127.0.0.1#
--server=/in-addr.arpa/127.0.0.1#
--server=/ip6.arpa/127.0.0.1#
State: Running
Started: Tue, Jun :: +
Last State: Terminated
Reason: Error
Exit Code:
Started: Tue, Jun :: +
Finished: Tue, Jun :: +
Ready: True
Restart Count:
Requests:
cpu: 150m
memory: 20Mi
Liveness: http-get http://:10054/healthcheck/dnsmasq delay=60s timeout=5s period=10s #success=1 #failure=5
Environment: <none>
Mounts:
/etc/k8s/dns/dnsmasq-nanny from kube-dns-config (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-dns-token-2ndrd (ro)
sidecar:
Container ID: docker://bffdb2ace942a0608c2a35e34098d0b43519cce8778371fd96ac549300bf9897
Image: mirrorgooglecontainers/k8s-dns-sidecar-amd64:1.14.
Image ID: docker-pullable://mirrorgooglecontainers/k8s-dns-sidecar-amd64@sha256:7caad6678b148c0c74f8b84efa93ddde84e742fa37b25d20ecfdbd43fba74360
Port: /TCP
Args:
--v=
--logtostderr
--probe=kubedns,127.0.0.1:,kubernetes.default.svc.cluster.local.,,A
--probe=dnsmasq,127.0.0.1:,kubernetes.default.svc.cluster.local.,,A
State: Running
Started: Tue, Jun :: +
Last State: Terminated
Reason: Error
Exit Code:
Started: Tue, Jun :: +
Finished: Tue, Jun :: +
Ready: True
Restart Count:
Requests:
cpu: 10m
memory: 20Mi
Liveness: http-get http://:10054/metrics delay=60s timeout=5s period=10s #success=1 #failure=5
Environment: <none>
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from kube-dns-token-2ndrd (ro)
Conditions:
Type Status
Initialized True
Ready True
PodScheduled True
Volumes:
kube-dns-config:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: kube-dns
Optional: true
kube-dns-token-2ndrd:
Type: Secret (a volume populated by a Secret)
SecretName: kube-dns-token-2ndrd
Optional: false
QoS Class: Burstable
Node-Selectors: <none>
Tolerations: CriticalAddonsOnly
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning Unhealthy 8m (x41 over 1h) kubelet, 172.18.196.2 Liveness probe failed: HTTP probe failed with statuscode:
Warning Unhealthy 7m (x15 over 1h) kubelet, 172.18.196.2 Liveness probe failed: Get http://172.20.1.9:10054/healthcheck/kubedns: dial tcp 172.20.1.9:10054: getsockopt: connection refused
这里有两个warning ,不知道什么原因
使用命令
kubectl logs -n kube-system kube-dns-c7d85897f-jmntw -c dnsmasq
得到结果
I0605 ::08.863881 main.go:] opts: {{/usr/sbin/dnsmasq [-k --cache-size= --log-facility=- --server=/cluster.local./127.0.0.1# --server=/in-addr.arpa/127.0.0.1# --server=/ip6.arpa/127.0.0.1#] true} /etc/k8s/dns/dnsmasq-nanny }
I0605 ::08.863997 nanny.go:] Starting dnsmasq [-k --cache-size= --log-facility=- --server=/cluster.local./127.0.0.1# --server=/in-addr.arpa/127.0.0.1# --server=/ip6.arpa/127.0.0.1#]
I0605 ::09.049758 nanny.go:]
W0605 ::09.049779 nanny.go:] Got EOF from stdout
I0605 ::09.049789 nanny.go:] dnsmasq[]: started, version 2.78 cachesize
I0605 ::09.049795 nanny.go:] dnsmasq[]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth no-DNSSEC loop-detect inotify
I0605 ::09.049800 nanny.go:] dnsmasq[]: using nameserver 127.0.0.1# for domain ip6.arpa
I0605 ::09.049803 nanny.go:] dnsmasq[]: using nameserver 127.0.0.1# for domain in-addr.arpa
I0605 ::09.049807 nanny.go:] dnsmasq[]: using nameserver 127.0.0.1# for domain cluster.local
I0605 ::09.049811 nanny.go:] dnsmasq[]: reading /etc/resolv.conf
I0605 ::09.049815 nanny.go:] dnsmasq[]: using nameserver 127.0.0.1# for domain ip6.arpa
I0605 ::09.049819 nanny.go:] dnsmasq[]: using nameserver 127.0.0.1# for domain in-addr.arpa
I0605 ::09.049823 nanny.go:] dnsmasq[]: using nameserver 127.0.0.1# for domain cluster.local
I0605 ::09.049827 nanny.go:] dnsmasq[]: using nameserver 127.0.1.1#
I0605 ::09.049836 nanny.go:] dnsmasq[]: read /etc/hosts - addresses
I0605 ::50.451300 nanny.go:] dnsmasq[]: Maximum number of concurrent DNS queries reached (max: )
I0605 ::00.464414 nanny.go:] dnsmasq[]: Maximum number of concurrent DNS queries reached (max: )
从这里可以看出nameserver是少了个节点上的nameserver
其实这里是因为忘了改node节点上的nameserver
修改 /etc/resolv.conf的nameserver
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAA0UAAABRCAYAAAAdKA2lAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAACLhSURBVHhe7Z09jypLk+ej117/mXXGgjaO2th1izPSSOMM4LTVbnuFrjECB2mMdkZqrx3QGkdg3XbbauMCH2AXpGPtGq1jnMKZdZ59vGuMz0RkZkG9V2ZR9KHg/5NCQJHkS2RkkFn5Ujd//PHHrt/vk7BYLEje//z5k25vb9U1AMQe/vKXv5hPANTP3/72N/gcAAAAAPwy/ot5BQAAAAAAAICrJHOmCAAAAAAAAACuhdSg6B//6Z/VewAAAAAAAAC4BlKDoq9fv6r3AAAAAAAAAHAN5A6K3t/f1SsAAAAAAAAAXDKFg6Lv37+r9wAAAAAAAABwqZQOir59+6Y+AwAAAAAAAMAlcsSR3D4tdwFNvOR74E0C2u12tPTNhSsm1EVUrkMvHvnLgIJo2YMlt5R8PH9JQcDhYgryaCLXovGIJJToL/laELBu626E9uUosvtfbwfu9XFOVNFffn2Iv+Y4PrcCGkET/VW+34iXJRB7T7iH0/kNUB/mP8DZENHO82hiOy+mrv4G47HdsE8IlktaSpwcT7Jvf8l+o/qgyL+n7nZBbxt+732hNgX0Q94DEGEzatPNzY2WzpS25vql401eadYlWnRM2UUen2luvo+j//TWYw7/0qGbXjrUahCJRyQRZt67oc7Lgmi8Zmc14Rjrwa0c+fxqO6irHL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x7Y6WAWZiAAAAAADAeXDzxx9/7Pp9/dDKxWJBX79+Ve/f39/p+/fv9O3bN/VZkCVGAIBsZIAJAAAAAACax8kOWgAAAAAAAACAJoBBEQAAAAAAAOCqcRoU7fegQCCQlAAAAAAAgGaCmSIAAAAAAADAVYNBEQAAAAAAAOCqwaAIAAAAAAAAcNVgUAQAAAAAAAC4ajAoAgAAAAAAAFw1GBQBAAAAAAAArhrHQZFPy2BHu52Rv/47LX3PfMd4Ewp2Af11t+SQAAAAAAAAAHD+OA2K/OWM/ge/bqcd6gym9L/p76n7P9c8OPpfNOHBkffQp9b2v9Lfrd5prn8CAAAAAAAAAGeN06Dovvv/6T9aW1q8bWgzH9E//Lcb6vzLiv7f332l4WxN62GLQ/0fGvQwJAIAAAAAAAA0AaL/BN/4uMaUaFJkAAAAAElFTkSuQmCC" alt="" />
改成学校的域名服务器,注意每一个node上都要改,因为不知道dns服务会部署在哪个node上
然后再重启kubedns的服务
kubectl delete pod -n kube-system kube-dns-69bf9d5cc9-c68mw
看到nameserver用了10.8.8.8就可以了
但是通常集群都有好多个节点,一个一个节点修改太慢了,下面再补充一个利用ansible 修改集群所有节点的nameserver
root@ht-:/etc/ansible# ansible all -m lineinfile -a "dest=/etc/resolv.conf regexp='nameserver 127.0.1.1' line='nameserver 10.8.8.8'"
【Kubernetes】kube-dns 持续重启的更多相关文章
- 构建gitlab+Jenkins+harbor+kubernetes的DevOps持续集成持续部署环境
构建gitlab+Jenkins+harbor+kubernetes的DevOps持续集成持续部署环境 整个环境的结构图. 一.准备工作 gitlab和harbor我是安装在kubernetes集群外 ...
- [linux]解决DNS配置重启丢失
DNS配置重启丢失 每次重启后都修改DNS配置文件 /etc/resolv.conf从网上得知 /etc/resolv.conf中的DNS配置是从/etc/resolvconf/resolv.conf ...
- Docker+GitLab+Jenkins+kubernetes实现DevOps 持续化集成和持续化部署概念图
Docker+GitLab+Jenkins+kubernetes实现DevOps 持续化集成和持续化部署概念图 转载自:原创 IT综合 作者:百联达 时间:2017-05-09 15:48:08 41 ...
- Cent0S 6.7直接在/etc/resolv.conf文件下修改DNS地址重启不生效问题【转】
CentOS 6.7/Linux下设置IP地址 1:临时修改: 1.1:修改IP地址 # ifconfig eth0 192.168.2.104 1.2:修改网关地址 # route add defa ...
- Jenkins+GitLab+Docker+SpringCloud+Kubernetes实现可持续自动化微服务
现有混合云平台的场景下,即有线下和线上的环境,又有测试与正式的场景,而且结合了Docker,导致打包内容有所区分,且服务的发布流程复杂起来,手工打包需要在编译阶段就要根据环境到处更改配置,因此纯手工发 ...
- Kubernetes部署DNS
前言 阅读地址 http://thoreauz.com/2017/04/16/docker/Kubernetes%E9%83%A8%E7%BD%B2DNS%E5%92%8CDashboard/ Kub ...
- liunx之:解决liunx下dns配置重启失效的问题
有时候能ping同ip地址,却ping不通域名,这就是dns没有配置的缘故. 但是DNS配置文件 /etc/resolv.conf 每次重启就会失效. 打开这个配置文件,发现有注释提示: Dynami ...
- CentOS DNS resolv重启无效的解决方法
分类: LINUX 直接修改/etc/resolv.conf不行.必须要在/etc/sysconfig/network-scripts/ifcfg-eth0里面最后 加上dns的设置.要不然,重启后, ...
- k8s集群之上游dns--dnsmasq,统一管理kubernetes的dns解析
1.概述 首先部署好kubernetes集群并采用Coredns进行解析,这样集群内部的服务都能通过内部域名进行访问.但是集群内部的coredns与物理机的dns解析不完全统一,coredns不能解析 ...
随机推荐
- php输出中文字符
中文字符不可以使用imagettftext()函数在图片中直接输出,如果要输出中文字符,需要先使用iconv()函数对中文字符进行编码,语法格式如下:string iconv ( string $in ...
- 138 Copy List with Random Pointer 复制带随机指针的链表
给出一个链表,每个节点包含一个额外增加的随机指针,该指针可以指向链表中的任何节点或空节点.返回一个深拷贝的链表. 详见:https://leetcode.com/problems/copy-list- ...
- solr 查询获取数量getCount()
//前期设置好查询条件和参数 long numFound = 0; SolrQuery query = new SolrQuery("*:*"); query.setQuery(& ...
- ASP.NET Core Action 读取流
以前mvc5 action可以直接使用 var stream = HttpContext.Current.Request.InputStream; 读取流,在Core中有所不同,可以使用以下方式读取 ...
- asp.net 微信登录实现方式
之前我以为做微信登录跟微信公众号有关,后来发现是我想多了.原来微信还有一个叫开放平台的东西,见下图: 我的这个已经生成好了,没有的需要创建一个,https://open.weixin.qq.com/c ...
- REST风格笔记
这一篇主要是看了FB的覃超大大的文章,做了一些笔记和自己的思考. 定义: 用URL来定义资源,用HTTP(GET/POST/DELETE/DETC)来描述操作. 1. REST描述的是网络 ...
- logging模块进阶2
1.两种级别设置: 全局级别:生成logger对象后设置的级别 局部级别:生成handler对象设置的级别 我们都知道输出的级别不能低于设定的级别,那么全局级别和局部级别哪一个对输出产生影响? 经过多 ...
- ES6学习笔记(9)----Symbol
参考书<ECMAScript 6入门>http://es6.ruanyifeng.com/ Symbol1.symbol:Symbol是javascript的第七种原始数据类型,代表独一无 ...
- android开发哪些坑需要注意
同一个应用的JNI代码,不要轻易换NDK编译的版本,否则会有很多问题(主要是一些方法实现不一样,并且高版本对代码的检测更严格),比如r8没有问题,但到r9就有问题了,这是个大坑: Android的JN ...
- 使用原生JavaScript模拟getElementByClassName .
最近在工作中,由于有一个插件必须使用jquery-pack.js,而这个包又是非常古老的jquery,所以又的函数是无法使用的,例如$()选择器以及parent()都取不到标签的内容. 所以没办法,只 ...