Yolean / kubernetes-kafka

Kafka cluster as Kubernetes StatefulSet, plain manifests and config
Apache License 2.0
1.84k stars 734 forks source link

All pods in pending state. #317

Closed navinSing closed 4 years ago

navinSing commented 4 years ago

All pods in pending state. (Using Bare Metal, ubuntu )

$ kubeadm version kubeadm version: &version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"clean", BuildDate:"2020-04-16T11:54:15Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}

$kubectl -n kafka get all NAME READY STATUS RESTARTS AGE pod/kafka-0 0/1 Pending 0 5m33s pod/pzoo-0 0/1 Pending 0 5m33s

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/bootstrap ClusterIP 10.96.188.103 9092/TCP 5m33s service/broker ClusterIP None 9092/TCP 5m33s service/pzoo ClusterIP None 2888/TCP,3888/TCP 5m33s service/zoo ClusterIP None 2888/TCP,3888/TCP 5m33s service/zookeeper ClusterIP 10.96.186.227 2181/TCP 5m33s

NAME READY AGE statefulset.apps/kafka 0/1 5m33s statefulset.apps/pzoo 0/1 5m33s statefulset.apps/zoo 0/0 5m33s

solsson commented 4 years ago

Try kubectl describe on statefulset and pods, look at the bottom of the output for reasons why they don't start.

FlorinAlexandru commented 4 years ago

I have the same problem. I used the following commands:

kubectl create namespace kafka kubectl apply -k variants/dev-small

The output of describe command is:

Warning FailedScheduling 32s (x3 over 107s) default-scheduler running "VolumeBinding" filter plugin for pod "pzoo-0": pod has unbound immediate PersistentVolumeClaims

Warning FailedScheduling 16s (x5 over 4m31s) default-scheduler running "VolumeBinding" filter plugin for pod "kafka-0": pod has unbound immediate PersistentVolumeClaims

Should I create persistent volume for dev-small?

Later edit

It's seems that doing

kubectl create namespace kafka && \ kubectl apply -k github.com/Yolean/kubernetes-kafka/variants/dev-small/?ref=v6.0.3 it's working without manually provisioning PV.

solsson commented 4 years ago

Should I create persistent volume for dev-small?

No, it should be automatic.

Can you check status and describe of pvs and pvcs?

FlorinAlexandru commented 4 years ago

Can you check status and describe of pvs and pvcs?

I can't manage to reproduce the behavior anymore. I recreated the cluster and now it worked as expected.

dnlcesilva commented 2 years ago

Hello @solsson

I have all pods pending with this error.

Can you help me?

NAME READY STATUS RESTARTS AGE pod/kafka-0 0/1 Pending 0 15m pod/kafka-1 0/1 Pending 0 15m pod/kafka-2 0/1 Pending 0 15m pod/pzoo-0 0/1 Pending 0 15m pod/pzoo-1 0/1 Pending 0 15m pod/pzoo-2 0/1 Pending 0 15m pod/zoo-0 0/1 Pending 0 18m pod/zoo-1 0/1 Pending 0 18m

Events: Type Reason Age From Message


Warning FailedScheduling 14m default-scheduler 0/2 nodes are available: 2 pod has unbound immediate PersistentVolumeClaims. Warning FailedScheduling 14m (x1 over 14m) default-scheduler 0/2 nodes are available: 2 pod has unbound immediate PersistentVolumeClaims.