来自服务器的错误 (BadRequest):容器 healthz 对 pod kube-dns-2425271678-cqm2n 无效

Error from server (BadRequest): container healthz is not valid for pod kube-dns-2425271678-cqm2n

环境:

Kubernetes版本(使用kubectl版本):v1.7.0
云提供商或硬件配置**:
OS(例如来自 /etc/os-release):分OS 7
内核(例如 uname -a):Linux k8s-master 3.10.0-514.6.2.el7.x86_64
安装工具:Kubeadm
其他:
docker 版本:Docker 版本 1.12.6,
我的 RPM 版本:
docker-1.12.6-16.el7.centos.x86_64.rpm
kubectl-1.7.0-0.x86_64.rpm
kubernetes-cni-0.5.1-0.x86_64.rpm
kubeadm-1.7.0-0.x86_64.rpm
kubelet-1.7.0-0.x86_64.rpm

这个命令来自官方文档,但是我的集群似乎没有 healthz 容器,我是不是漏掉了什么?

[root@k8s-master ~]# kubectl logs --namespace=kube-system $(kubectl get pods --namespace=kube-system -l k8s-app=kube-dns -o name) -c healthz
Error from server (BadRequest): container healthz is not valid for pod kube-dns-2425271678-cqm2n


[root@k8s-master ~]# kubectl get pods --all-namespaces -o wide
NAMESPACE     NAME                                    READY     STATUS     RESTARTS   AGE       IP              NODE
default       busybox                                 1/1       Running   1          1h        172.16.2.7      k8s-node2
kube-system   etcd-k8s-master                         1/1       Running   0          21h       10.132.41.234   k8s-master
kube-system   heapster-2994581613-7ppn7               1/1       Running   0          20h       172.16.2.6      k8s-node2
kube-system   kube-apiserver-k8s-master               1/1       Running   0          21h       10.132.41.234   k8s-master
kube-system   kube-controller-manager-k8s-master      1/1       Running   0          21h       10.132.41.234   k8s-master
kube-system   kube-dns-2425271678-cqm2n               3/3       Running   0          21h       172.16.0.2      k8s-master
kube-system   kube-flannel-ds-18dr4                   2/2       Running   0          20h       10.132.41.234   k8s-master
kube-system   kube-flannel-ds-vpkpb                   2/2       Running   0          20h       10.165.97.219   k8s-node1
kube-system   kube-flannel-ds-x3n24                   2/2       Running   0          20h       10.161.233.80   k8s-node2
kube-system   kube-proxy-2xhn9                        1/1       Running   0          21h       10.132.41.234   k8s-master
kube-system   kube-proxy-7hmmx                        1/1       Running   0          20h       10.165.97.219   k8s-node1
kube-system   kube-proxy-h1gmc                        1/1       Running   0          20h       10.161.233.80   k8s-node2
kube-system   kube-scheduler-k8s-master               1/1       Running   0          21h       10.132.41.234   k8s-master
kube-system   kubernetes-dashboard-2209332821-038fw   1/1       Running   0          20h       172.16.1.2      k8s-node1
kube-system   monitoring-grafana-1850655027-vwzcw     1/1       Running   0          20h       172.16.2.5      k8s-node2
kube-system   monitoring-influxdb-1870447071-vx3md    1/1       Running   0          20h       172.16.1.3      k8s-node1


[root@k8s-master ~]# docker ps |grep dns
d3668f0904fb        3e08c89ee425                                                                                     "/kube-dns --domain=c"   20 hours ago        Up 20 hours                             k8s_kubedns_kube-dns-2425271678-cqm2n_kube-system_42298b87-7032-11e7-a792-00163e024627_0
5ddf2d4f6adb        db8241b72199                                                                                     "/sidecar --v=2 --log"   20 hours ago        Up 20 hours                             k8s_sidecar_kube-dns-2425271678-cqm2n_kube-system_42298b87-7032-11e7-a792-00163e024627_0
101119787b35        1813641c1a74                                                                                     "/dnsmasq-nanny -v=2 "   20 hours ago        Up 20 hours                             k8s_dnsmasq_kube-dns-2425271678-cqm2n_kube-system_42298b87-7032-11e7-a792-00163e024627_0
1d80ad4754a3        gcr.io/google_containers/pause-amd64:3.0                                                         "/pause"                 20 hours ago        Up 20 hours                             k8s_POD_kube-dns-2425271678-cqm2n_kube-system_42298b87-7032-11e7-a792-00163e024627_0

选项 -c healthz 正在请求名称为 healthz 的容器,该容器不存在。您可以改用 -c kube-dns-c sidecar.