sudhir kumar:
Unable to create any pod on my cluster. Below are details
k describe pod nginx;
Name: nginx
Namespace: default
Priority: 0
Node: <none>
Labels: run=nginx
Annotations: <none>
Status: Pending
IP:
IPs: <none>
Containers:
nginx:
Image: nginx
Port: <none>
Host Port: <none>
Environment: <none>
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from default-token-z2m9l (ro)
Volumes:
default-token-z2m9l:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-z2m9l
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: <http://node.kubernetes.io/not-ready:NoExecute|node.kubernetes.io/not-ready:NoExecute> for 300s
<http://node.kubernetes.io/unreachable:NoExecute|node.kubernetes.io/unreachable:NoExecute> for 300s
Events: <none>
[root@master01 np]# k get pods;
NAME READY STATUS RESTARTS AGE
nginx 0/1 Pending 0 11m
test-pod 0/1 Pending 0 15m
[root@master01 np]# k get nodes;
NAME STATUS ROLES AGE VERSION
master01 Ready master 422d v1.18.3
node01 Ready <none> 422d v1.18.3
[root@master01 np]# k get pods -n kube-system
NAME READY STATUS RESTARTS AGE
coredns-66bff467f8-2cw8c 1/1 Running 3 365d
coredns-66bff467f8-4r6l9 1/1 Running 3 365d
etcd-master01 1/1 Running 11 422d
kube-apiserver-master01 1/1 Running 0 24h
kube-controller-manager-master01 1/1 Running 236 422d
kube-proxy-kqbq4 1/1 Running 7 422d
kube-proxy-ss6r2 1/1 Running 7 422d
kube-scheduler-master01 1/1 Running 210 422d
metrics-server-79497bd4fc-sdqsv 0/1 CrashLoopBackOff 515 292d
weave-net-q8824 2/2 Running 662 422d
weave-net-qgnkk 2/2 Running 13 422d
unnivkn:
How many nodes in your cluster ? Make sure there is no Taint applied on your nodes. Also please check your scheduler is up & running? k get no k -n kube-system get po
sudhir kumar:
There is no taint applied on any of the nodes, that was the first thing checked.
unnivkn:
can you paste the yaml here ? also k get no
sudhir kumar:
@unnivkn
k get pods -n kube-system
NAME READY STATUS RESTARTS AGE
coredns-66bff467f8-2cw8c 1/1 Running 3 365d
coredns-66bff467f8-4r6l9 1/1 Running 3 365d
etcd-master01 1/1 Running 11 422d
kube-apiserver-master01 1/1 Running 0 24h
kube-controller-manager-master01 1/1 Running 236 422d
kube-proxy-kqbq4 1/1 Running 7 422d
kube-proxy-ss6r2 1/1 Running 7 422d
kube-scheduler-master01 1/1 Running 210 422d
metrics-server-79497bd4fc-sdqsv 0/1 CrashLoopBackOff 515 292d
weave-net-q8824 2/2 Running 662 422d
weave-net-qgnkk 2/2 Running 13 422d
k get nodes;
NAME STATUS ROLES AGE VERSION
master01 Ready master 423d v1.18.3
node01 Ready <none> 423d v1.18.3
k describe node master01
Name: master01
Roles: master
Labels: <http://beta.kubernetes.io/arch=amd64|beta.kubernetes.io/arch=amd64>
<http://beta.kubernetes.io/os=linux|beta.kubernetes.io/os=linux>
<http://kubernetes.io/arch=amd64|kubernetes.io/arch=amd64>
<http://kubernetes.io/hostname=master01|kubernetes.io/hostname=master01>
<http://kubernetes.io/os=linux|kubernetes.io/os=linux>
<http://node-role.kubernetes.io/master=|node-role.kubernetes.io/master=>
Annotations: <http://kubeadm.alpha.kubernetes.io/cri-socket|kubeadm.alpha.kubernetes.io/cri-socket>: /var/run/dockershim.sock
<http://node.alpha.kubernetes.io/ttl|node.alpha.kubernetes.io/ttl>: 0
<http://volumes.kubernetes.io/controller-managed-attach-detach|volumes.kubernetes.io/controller-managed-attach-detach>: true
CreationTimestamp: Sat, 30 May 2020 09:00:07 -0700
Taints: <http://node-role.kubernetes.io/master:NoSchedule|node-role.kubernetes.io/master:NoSchedule>
Unschedulable: false
Lease:
HolderIdentity: master01
AcquireTime: <unset>
RenewTime: Tue, 27 Jul 2021 12:14:58 -0700
Conditions:
Type Status LastHeartbeatTime LastTransitionTime Reason Message
---- ------ ----------------- ------------------ ------ -------
NetworkUnavailable False Tue, 27 Apr 2021 12:37:56 -0700 Tue, 27 Apr 2021 12:37:56 -0700 WeaveIsUp Weave pod has set this
MemoryPressure False Tue, 27 Jul 2021 12:12:55 -0700 Tue, 27 Apr 2021 23:50:46 -0700 KubeletHasSufficientMemory kubelet has sufficient memory available
DiskPressure False Tue, 27 Jul 2021 12:12:55 -0700 Tue, 27 Apr 2021 23:50:46 -0700 KubeletHasNoDiskPressure kubelet has no disk pressure
PIDPressure False Tue, 27 Jul 2021 12:12:55 -0700 Tue, 27 Apr 2021 23:50:46 -0700 KubeletHasSufficientPID kubelet has sufficient PID available
Ready True Tue, 27 Jul 2021 12:12:55 -0700 Sat, 24 Jul 2021 14:35:56 -0700 KubeletReady kubelet is posting ready status
Addresses:
InternalIP: 172.16.190.169
Hostname: master01
Capacity:
cpu: 2
ephemeral-storage: 49997976Ki
hugepages-1Gi: 0
hugepages-2Mi: 0
memory: 3863536Ki
pods: 110
Allocatable:
cpu: 2
ephemeral-storage: 46078134606
hugepages-1Gi: 0
hugepages-2Mi: 0
memory: 3761136Ki
pods: 110
System Info:
Machine ID: f78b180c9b664e1b97e57aa73415b796
System UUID: 6E2F4D56-F332-07FC-81E2-CFDC626373D3
Boot ID: 95cdadcf-3024-4df9-9531-e8ed12b14161
Kernel Version: 3.10.0-862.11.6.el7.x86_64
OS Image: CentOS Linux 7 (Core)
Operating System: linux
Architecture: amd64
Container Runtime Version: <docker://1.13.1>
Kubelet Version: v1.18.3
Kube-Proxy Version: v1.18.3
Non-terminated Pods: (10 in total)
Namespace Name CPU Requests CPU Limits Memory Requests Memory Limits AGE
--------- ---- ------------ ---------- --------------- ------------- ---
kube-system coredns-66bff467f8-2cw8c 100m (5%) 0 (0%) 70Mi (1%) 170Mi (4%) 365d
kube-system coredns-66bff467f8-4r6l9 100m (5%) 0 (0%) 70Mi (1%) 170Mi (4%) 365d
kube-system etcd-master01 0 (0%) 0 (0%) 0 (0%) 0 (0%) 423d
kube-system kube-apiserver-master01 250m (12%) 0 (0%) 0 (0%) 0 (0%) 46h
kube-system kube-controller-manager-master01 200m (10%) 0 (0%) 0 (0%) 0 (0%) 423d
kube-system kube-proxy-ss6r2 0 (0%) 0 (0%) 0 (0%) 0 (0%) 423d
kube-system kube-scheduler-master01 100m (5%) 0 (0%) 0 (0%) 0 (0%) 423d
kube-system weave-net-qgnkk 20m (1%) 0 (0%) 0 (0%) 0 (0%) 423d
kubernetes-dashboard dashboard-metrics-scraper-6b4884c9d5-krngq 0 (0%) 0 (0%) 0 (0%) 0 (0%) 365d
kubernetes-dashboard kubernetes-dashboard-7b544877d5-w5d7l 0 (0%) 0 (0%) 0 (0%) 0 (0%) 365d
Allocated resources:
(Total limits may be over 100 percent, i.e., overcommitted.)
Resource Requests Limits
-------- -------- ------
cpu 770m (38%) 0 (0%)
memory 140Mi (3%) 340Mi (9%)
ephemeral-storage 0 (0%) 0 (0%)
hugepages-1Gi 0 (0%) 0 (0%)
hugepages-2Mi 0 (0%) 0 (0%)
Events: <none>
-------------------------------
k describe node node1
Error from server (NotFound): nodes "node1" not found
[root@master01 np]# k describe node node01
Name: node01
Roles: <none>
Labels: <http://beta.kubernetes.io/arch=amd64|beta.kubernetes.io/arch=amd64>
<http://beta.kubernetes.io/os=linux|beta.kubernetes.io/os=linux>
<http://kubernetes.io/arch=amd64|kubernetes.io/arch=amd64>
<http://kubernetes.io/hostname=node01|kubernetes.io/hostname=node01>
<http://kubernetes.io/os=linux|kubernetes.io/os=linux>
Annotations: <http://kubeadm.alpha.kubernetes.io/cri-socket|kubeadm.alpha.kubernetes.io/cri-socket>: /var/run/dockershim.sock
<http://node.alpha.kubernetes.io/ttl|node.alpha.kubernetes.io/ttl>: 0
<http://volumes.kubernetes.io/controller-managed-attach-detach|volumes.kubernetes.io/controller-managed-attach-detach>: true
CreationTimestamp: Sat, 30 May 2020 09:47:11 -0700
Taints: <none>
Unschedulable: false
Lease:
HolderIdentity: node01
AcquireTime: <unset>
RenewTime: Tue, 27 Jul 2021 12:15:42 -0700
Conditions:
Type Status LastHeartbeatTime LastTransitionTime Reason Message
---- ------ ----------------- ------------------ ------ -------
NetworkUnavailable False Sat, 24 Jul 2021 14:29:43 -0700 Sat, 24 Jul 2021 14:29:43 -0700 WeaveIsUp Weave pod has set this
MemoryPressure False Tue, 27 Jul 2021 12:13:13 -0700 Tue, 27 Apr 2021 23:49:21 -0700 KubeletHasSufficientMemory kubelet has sufficient memory available
DiskPressure False Tue, 27 Jul 2021 12:13:13 -0700 Tue, 27 Apr 2021 23:49:21 -0700 KubeletHasNoDiskPressure kubelet has no disk pressure
PIDPressure False Tue, 27 Jul 2021 12:13:13 -0700 Tue, 27 Apr 2021 23:49:21 -0700 KubeletHasSufficientPID kubelet has sufficient PID available
Ready True Tue, 27 Jul 2021 12:13:13 -0700 Tue, 27 Apr 2021 23:49:21 -0700 KubeletReady kubelet is posting ready status
Addresses:
InternalIP: 172.16.190.170
Hostname: node01
Capacity:
cpu: 2
ephemeral-storage: 49997976Ki
hugepages-1Gi: 0
hugepages-2Mi: 0
memory: 3863536Ki
pods: 110
Allocatable:
cpu: 2
ephemeral-storage: 46078134606
hugepages-1Gi: 0
hugepages-2Mi: 0
memory: 3761136Ki
pods: 110
System Info:
Machine ID: 43b12b6ce46c40849754401fa4b5408b
System UUID: 6E2F4D56-F332-07FC-81E2-CFDC626373D3
Boot ID: 6559ff12-1b02-46e9-addd-7bc5a7c06d6b
Kernel Version: 3.10.0-862.11.6.el7.x86_64
OS Image: CentOS Linux 7 (Core)
Operating System: linux
Architecture: amd64
Container Runtime Version: <docker://1.13.1>
Kubelet Version: v1.18.3
Kube-Proxy Version: v1.18.3
Non-terminated Pods: (3 in total)
Namespace Name CPU Requests CPU Limits Memory Requests Memory Limits AGE
--------- ---- ------------ ---------- --------------- ------------- ---
kube-system kube-proxy-kqbq4 0 (0%) 0 (0%) 0 (0%) 0 (0%) 423d
kube-system metrics-server-79497bd4fc-sdqsv 0 (0%) 0 (0%) 0 (0%) 0 (0%) 292d
kube-system weave-net-q8824 20m (1%) 0 (0%) 0 (0%) 0 (0%) 423d
Allocated resources:
(Total limits may be over 100 percent, i.e., overcommitted.)
Resource Requests Limits
-------- -------- ------
cpu 20m (1%) 0 (0%)
memory 0 (0%) 0 (0%)
ephemeral-storage 0 (0%) 0 (0%)
hugepages-1Gi 0 (0%) 0 (0%)
hugepages-2Mi 0 (0%) 0 (0%)
Events: <none>
unnivkn:
What you are getting for this ?
k get po -owide
k describe po <pod-name>
k logs <pod-name>
docker ps -a | grep <pod-name>
docker logs <container-id>
k get po <pod-name> -o yaml