Error
$ kubectl describe pod kafka-channel-receiver-5c6949dbd4-sx445 -nknative-eventing
Name: kafka-channel-receiver-5c6949dbd4-sx445
Namespace: knative-eventing
Priority: 0
Service Account: knative-kafka-channel-data-plane
Node: minikube/192.168.59.106
Start Time: Fri, 28 Apr 2023 07:25:33 +0530
Labels: app=kafka-channel-receiver
kafka.eventing.knative.dev/release=44c60b11c471210c372a26a1beb10500d181ad7b
pod-template-hash=5c6949dbd4
Annotations: <none>
Status: Pending
IP: 172.17.0.23
IPs:
IP: 172.17.0.23
Controlled By: ReplicaSet/kafka-channel-receiver-5c6949dbd4
Containers:
kafka-channel-receiver:
Container ID:
Image: gcr.io/knative-releases/knative-kafka-broker-receiver:v1.9.6
Image ID:
Ports: 9090/TCP, 8080/TCP
Host Ports: 0/TCP, 0/TCP
State: Waiting
Reason: ImagePullBackOff
Ready: False
Restart Count: 0
Requests:
cpu: 200m
memory: 450Mi
Liveness: http-get http://:8080/healthz delay=10s timeout=1s period=3s #success=1 #failure=3
Readiness: http-get http://:8080/readyz delay=10s timeout=1s period=3s #success=1 #failure=3
Environment:
SERVICE_NAME: kafka-channel-receiver
SERVICE_NAMESPACE: knative-eventing (v1:metadata.namespace)
INGRESS_PORT: 8080
PRODUCER_CONFIG_FILE_PATH: /etc/config/config-kafka-channel-producer.properties
HTTPSERVER_CONFIG_FILE_PATH: /etc/config/config-kafka-channel-httpserver.properties
DATA_PLANE_CONFIG_FILE_PATH: /etc/channels-subscriptions/data
LIVENESS_PROBE_PATH: /healthz
READINESS_PROBE_PATH: /readyz
METRICS_PATH: /metrics
METRICS_PORT: 9090
METRICS_PUBLISH_QUANTILES: false
METRICS_JVM_ENABLED: false
CONFIG_TRACING_PATH: /etc/tracing
HTTP2_DISABLE: true
WAIT_STARTUP_SECONDS: 8
JAVA_TOOL_OPTIONS: -XX:+CrashOnOutOfMemoryError
Mounts:
/etc/channels-subscriptions from kafka-channel-channels-subscriptions (ro)
/etc/config from config-kafka-channel-data-plane (ro)
/etc/logging from kafka-channel-config-logging (ro)
/etc/tracing from config-tracing (ro)
/tmp from cache (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-jtkwh (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
kafka-channel-channels-subscriptions:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: kafka-channel-channels-subscriptions
Optional: false
config-kafka-channel-data-plane:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: config-kafka-channel-data-plane
Optional: false
cache:
Type: EmptyDir (a temporary directory that shares a pod's lifetime)
Medium:
SizeLimit: <unset>
kafka-channel-config-logging:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: kafka-config-logging
Optional: false
config-tracing:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: config-tracing
Optional: false
kube-api-access-jtkwh:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional: <nil>
DownwardAPI: true
QoS Class: Burstable
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Topology Spread Constraints: topology.kubernetes.io/zone:ScheduleAnyway when max skew 2 is exceeded for selector app=kafka-channel-receiver
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 15m default-scheduler Successfully assigned knative-eventing/kafka-channel-receiver-5c6949dbd4-sx445 to minikube
Warning FailedMount 14m (x8 over 15m) kubelet MountVolume.SetUp failed for volume "kafka-channel-channels-subscriptions" : configmap "kafka-channel-channels-subscriptions" not found
Warning FailedMount 13m kubelet Unable to attach or mount volumes: unmounted volumes=[kafka-channel-channels-subscriptions], unattached volumes=[kube-api-access-jtkwh config-kafka-channel-data-plane kafka-channel-channels-subscriptions cache kafka-channel-config-logging config-tracing]: timed out waiting for the condition
Warning Failed 4m59s kubelet Failed to pull image "gcr.io/knative-releases/knative-kafka-broker-receiver:v1.9.6": rpc error: code = Unknown desc = context deadline exceeded
Warning Failed 4m59s kubelet Error: ErrImagePull
Normal BackOff 4m54s kubelet Back-off pulling image "gcr.io/knative-releases/knative-kafka-broker-receiver:v1.9.6"
Warning Failed 4m54s kubelet Error: ImagePullBackOff
Normal Pulling 4m31s (x2 over 12m) kubelet Pulling image "gcr.io/knative-releases/knative-kafka-broker-receiver:v1.9.6"
Solution
The output of the kubectl describe pod command shows information about a Kubernetes pod named kafka-channel-receiver-5c6949dbd4-sx445 running in the knative-eventing namespace. The pod is currently in a "Pending" state, which means that it has been scheduled to run on a Kubernetes node, but it is not yet running.
The Containers section of the output shows that the pod has one container named kafka-channel-receiver. This container is based on the Docker image gcr.io/knative-releases/knative-kafka-broker-receiver:v1.9.6. The container has two ports, 9090 and 8080, exposed to receive traffic. The container also has some environment variables set, which define various configuration options for the container.
The Volumes section of the output shows that the pod has several volumes mounted, including several config maps and an empty directory.
The Events section of the output shows that the pod was successfully scheduled, but there was an error when trying to mount the kafka-channel-channels-subscriptions volume. This error occurred repeatedly and caused the pod to remain in the "Pending" state.
This error message indicates that there is a problem with setting up a volume named “kafka-channel-channels-subscriptions” in your Kubernetes cluster. Specifically, the error message suggests that a ConfigMap named “kafka-channel-channels-subscriptions” is not found.
To resolve this issue, you should check if the ConfigMap exists in your cluster by running the following command:
arduinoCopy codekubectl get configmap kafka-channel-channels-subscriptions
If the ConfigMap is not found, you should create it using the appropriate configuration data. For example, you could create a ConfigMap from a file named config.properties using the following command:
luaCopy codekubectl create configmap kafka-channel-channels-subscriptions --from-file=config.properties
Alternatively, you could create a ConfigMap from a literal value using the following command:
luaCopy codekubectl create configmap kafka-channel-channels-subscriptions --from-literal=key=value
After creating the ConfigMap, you should verify that it is available in your cluster by running the kubectl get configmap command again. Once the ConfigMap is available, you should be able to successfully set up the volume in your Kubernetes deployment or statefulset.