其它redis服务及dns等启动正常,redis的service等配置检查了好几遍也没什么问题,但是这里dns就是解析不到,请大神帮忙解答一下!
[k8s@centos01 kubernetes-dashboard]$ kubectl run -i --tty --image busybox dns-test --restart=Never --rm /bin/sh
If you don't see a command prompt, try pressing enter.
/ # nslookup redis-app-0.redis-service
Server: 10.96.0.10
Address: 10.96.0.10:53
** server can't find redis-app-0.redis-service: NXDOMAIN
*** Can't find redis-app-0.redis-service: No answer
[k8s@centos01 kubernetes-dashboard]$ kubectl get pods -n kube-system
NAME READY STATUS RESTARTS AGE
coredns-5c98db65d4-sjmp5 1/1 Running 10 18d
coredns-5c98db65d4-v9zfs 1/1 Running 10 18d
etcd-centos01 1/1 Running 13 18d
kube-apiserver-centos01 1/1 Running 15 18d
kube-controller-manager-centos01 1/1 Running 15 18d
kube-flannel-ds-amd64-cc9nc 1/1 Running 16 18d
kube-flannel-ds-amd64-hzvxc 1/1 Running 9 18d
kube-flannel-ds-amd64-l48zg 1/1 Running 9 18d
kube-proxy-8r2rj 1/1 Running 11 18d
kube-proxy-gbvr8 1/1 Running 9 18d
kube-proxy-m85wg 1/1 Running 9 18d
kube-scheduler-centos01 1/1 Running 14 18d
kubernetes-dashboard-f4f9ff989-blfkh 1/1 Running 9 17d
[k8s@centos01 kubernetes-dashboard]$ kubectl get pods
NAME READY STATUS RESTARTS AGE
centos 0/1 Error 0 11d
redis-app-0 1/1 Running 2 11d
redis-app-1 1/1 Running 2 11d
redis-app-2 1/1 Running 2 11d
redis-app-3 1/1 Running 2 11d
redis-app-4 1/1 Running 2 11d
redis-app-5 1/1 Running 2 11d
[k8s@centos01 kubernetes-dashboard]$ kubectl describe pod redis-app-0
Name: redis-app-0
Namespace: default
Priority: 0
Node: centos03/192.168.1.122
Start Time: Tue, 24 Sep 2019 22:14:38 +0800
Labels: app=redis
appCluster=redis-cluster
controller-revision-hash=redis-app-6f44c78fbb
statefulset.kubernetes.io/pod-name=redis-app-0
Annotations:
Status: Running
IP: 10.244.2.30
Controlled By: StatefulSet/redis-app
Containers:
redis:
Container ID: docker://dd48411a225592fc743385ec73aafde6aa4365abd560ba1bcec008cee9fc1a55
Image: redis
Image ID: docker-pullable://redis@sha256:cb379e1a076fcd3d3f09e10d7b47ca631fb98fb33149ab559fa02c1b11436345
Ports: 6379/TCP, 16379/TCP
Host Ports: 0/TCP, 0/TCP
Command:
redis-server
Args:
/etc/redis/redis.conf
--protected-mode
no
State: Running
Started: Sat, 05 Oct 2019 23:39:27 +0800
Last State: Terminated
Reason: Error
Exit Code: 255
Started: Wed, 25 Sep 2019 07:52:46 +0800
Finished: Sat, 05 Oct 2019 16:48:50 +0800
Ready: True
Restart Count: 2
Requests:
cpu: 100m
memory: 100Mi
Environment:
Mounts:
/etc/redis from redis-conf (rw)
/var/lib/redis from redis-data (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-9lbbk (ro)
Conditions:
Type Status
Initialized True
Ready True
ContainersReady True
PodScheduled True
Volumes:
redis-data:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: redis-data-redis-app-0
ReadOnly: false
redis-conf:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: redis-conf
Optional: false
default-token-9lbbk:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-9lbbk
Optional: false
QoS Class: Burstable
Node-Selectors:
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
Warning FailedMount 10d kubelet, centos03 MountVolume.SetUp failed for volume "redis-conf" : couldn't propagate object cache: timed out waiting for the condition
Warning FailedMount 10d kubelet, centos03 MountVolume.SetUp failed for volume "default-token-9lbbk" : couldn't propagate object cache: timed out waiting for the condition