cp-kafka-rest in Kubernetes exits with error
See original GitHub issue- Starting Kafka Rest Proxy in Kubernetes exits with
$ kubectl logs -f kafka-rest-lr991
+ [[ -n tcp://10.0.0.95:8082 ]]
+ echo 'PORT is deprecated. Please use KAFKA_REST_LISTENERS instead.'
+ exit 1
PORT is deprecated. Please use KAFKA_REST_LISTENERS instead.
-
Environment
- Zookeeper deployed into Kubernetes cluster using image from - https://hub.docker.com/r/elevy/zookeeper/
- Kafka deployed into Kubernetes cluster using image from - https://hub.docker.com/r/cloudtrackinc/kubernetes-kafka/
- Kafka REST Proxy deployed into Kubernetes cluster using image from - https://hub.docker.com/r/confluentinc/cp-kafka-rest/
-
Followed this thread in Stackoverflow (https://stackoverflow.com/questions/41868161/kafka-in-kubernetes-cluster-how-to-publish-consume-messages-from-outside-of-kub/41869856).
-
Following “kaka-rest-controller.yaml” file is used to start the pod in Kubernetes with required ENV variables
------------kaka-rest-controller.yaml-----------------
apiVersion: v1
kind: ReplicationController
metadata:
labels:
app: kafka-rest
component: kafka-rest-endpoint
name: kafka-rest
spec:
replicas: 1
template:
metadata:
labels:
app: kafka-rest
component: kafka-rest-endpoint
spec:
containers:
- name: kafka-rest
image: confluentinc/cp-kafka-rest:3.2.2
env:
- name: KAFKA_REST_HOST_NAME
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: KAFKA_REST_ZOOKEEPER_CONNECT
value: zookeeper:2181
Not sure if there are additional environmental variables missing, By default the Docker image seem to set the PORT by default and seem to check for it to exit.
Any help is appreciated
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:10
Top Results From Across the Web
Kafka Rest Proxy exits with error code 1 and no descriptive log ...
I've notices that when launching the image locally the SimpleLoggerFactory binding is used and when it is launched on remote kubernetes cluster ...
Read more >Troubleshoot Confluent for Kubernetes
The ConfluentRolebindings custom resources (CRs) can be stuck in the DELETING state if associated Kafka cluster is removed. Solution: Manually remove the ...
Read more >Exit code 1 for multiple containers, missing Dockerfile #53
schema-registry | Caused by: org.apache.kafka.common.errors.TimeoutException: Timed out waiting to send the call. schema-registry | [main] ERROR ...
Read more >Documentation - Apache Kafka
We provide a Java client for Kafka, but clients are available in many languages. ... TopicCommand) now exits with non-zero exit code on...
Read more >confluentinc - Bountysource
I am using the Docker image from "confluentinc/cp-kafka-rest:5.2.3" and my deployment looks something like below. I can see variables to change settings like ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Do you have a Kubernetes service called kafka-rest in your setup?
Environment variables are added by Kubernetes for services by default, and I found that I had to name the service something else like kafka-rest-service for it to not find that environment variable and continue on.
I managed to workaround this issue without renaming the service by unsetting the environment variable before running: