I am check the cluster info and find kubernetes dashboard pod is pending:
[root@ops001 data]# kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
default my-nginx-756fb87568-rcdsm 0/1 Pending 0 81d
default my-nginx-756fb87568-vtf46 0/1 Pending 0 81d
default soa-room-service-768cfd68d-5zxgd 0/1 Pending 0 81d
kube-system coredns-89764d78c-mbcbz 0/1 Pending 0 123d
kube-system kubernetes-dashboard-74d7cc788-8fggl 0/1 Pending 0 15d
kube-system kubernetes-dashboard-74d7cc788-mk9c7 0/1 UnexpectedAdmissionError 0 123d
this is lack of resource?this is the detail output:
[root@ops001 ~]# kubectl describe pod kubernetes-dashboard-74d7cc788-8fggl --namespace kube-system
Name: kubernetes-dashboard-74d7cc788-8fggl
Namespace: kube-system
Priority: 2000000000
Priority Class Name: system-cluster-critical
Node: <none>
Labels: k8s-app=kubernetes-dashboard
pod-template-hash=74d7cc788
Annotations: scheduler.alpha.kubernetes.io/critical-pod:
seccomp.security.alpha.kubernetes.io/pod: docker/default
Status: Pending
IP:
Controlled By: ReplicaSet/kubernetes-dashboard-74d7cc788
Containers:
kubernetes-dashboard:
Image: gcr.azk8s.cn/google_containers/kubernetes-dashboard-amd64:v1.10.1
Port: 8443/TCP
Host Port: 0/TCP
Args:
--auto-generate-certificates
Limits:
cpu: 100m
memory: 300Mi
Requests:
cpu: 50m
memory: 100Mi
Liveness: http-get https://:8443/ delay=30s timeout=30s period=10s #success=1 #failure=3
Environment: <none>
Mounts:
/certs from kubernetes-dashboard-certs (rw)
/tmp from tmp-volume (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kubernetes-dashboard-token-pmxpf (ro)
Volumes:
kubernetes-dashboard-certs:
Type: Secret (a volume populated by a Secret)
SecretName: kubernetes-dashboard-certs
Optional: false
tmp-volume:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit: <unset>
kubernetes-dashboard-token-pmxpf:
Type: Secret (a volume populated by a Secret)
SecretName: kubernetes-dashboard-token-pmxpf
Optional: false
QoS Class: Burstable
Node-Selectors: <none>
Tolerations: CriticalAddonsOnly
node.kubernetes.io/not-ready:NoExecute for 360s
node.kubernetes.io/unreachable:NoExecute for 360s
Events: <none>
this is the node top output:
[root@ops001 ~]# top
top - 23:45:57 up 244 days, 5:56, 7 users, load average: 3.45, 2.93, 3.77
Tasks: 245 total, 1 running, 244 sleeping, 0 stopped, 0 zombie
%Cpu(s): 38.6 us, 8.4 sy, 0.0 ni, 49.2 id, 3.4 wa, 0.0 hi, 0.4 si, 0.0 st
KiB Mem : 16266412 total, 3963688 free, 5617380 used, 6685344 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 10228760 avail Mem
the kube-scheduler
service is up.I have no idea where is going wrong.
From what I can see you have all pods in pending
state even coredns
. This is the main reason why dashboard
doesn't work.
I would focus on dealing with that first, for this I'd recommend checking Troubleshooting kubeadm.
This will tell you to install networking addon which can be found here.
You can also have a look at this question Kube-dns always in pending state.