我在Kubernetes集群(带有Kafka集群,v2.4.0,已经与Strimzi一起部署)上部署了ksqlDB
服务器,具有以下部署文件:
apiVersion: v1
kind: Pod
metadata:
name: ksqldb-server
labels:
app: ksqldb-server
spec:
containers:
- name: ksqldb-server
# get latest version of image
image: confluentinc/ksqldb-cli:latest
imagePullPolicy: IfNotPresent
command: ["/bin/bash"]
args: ["-c","echo Waiting for Kafka to be ready... && \
cub kafka-ready -b my-kafka-brokers:9092 1 20 && \
echo Waiting a few seconds for topic creation to finish... && \
sleep 2 && \
/usr/bin/ksql-server-start /etc/ksqldb/ksql-server.properties"]
env:
- name: KSQL_CONFIG_DIR
value: "/etc/ksqldb"
- name: KSQL_OPTS
value: "-Dbootstrap.servers=my-kafka-brokers:9092 -Dksql.streams.auto.offset.reset=earliest"
- name: KSQL_LOG4J_OPTS
value: "-Dlog4j.configuration=file:/etc/ksqldb/log4j-rolling.properties"
ports:
# containerPort is the port exposed by the container (where ksql server is listening)
- containerPort: 8088
当我运行ksql
时,ksql-cli
开始运行,但是我得到Couldn't connect to the KSQL server: KSQL is not yet ready to serve requests
和Server Status: <unknown>
。我无法成功执行任何语句(LIST TOPICS; CREATE STREAMS
ecc)。我在另一个Kubernetes集群(使用Kafka集群v2.3.0)上部署了先前的配置,并且一切正常(我可以创建流,连接器ecc)。 ksql-server
v5.1.2的先前部署是否可能产生冲突?在部署kubectl
之前,我用ksqlDB-server
删除了此窗格。
预先谢谢你。