我需要在 kubernetes 上启动 Kafka Rest Proxy。当我使用 docker-compose 在本地机器上使用本地 Kafka 代理和 zookeeper 启动它时,它运行良好,我得到了最后一个日志输出,表明 Kafka Rest 正在运行并等待请求。当我在 kubernetes 上启动它时,我只得到以下输出:
===> User
uid=1000(appuser) gid=1000(appuser) groups=1000(appuser)
===> Configuring ...
===> Running preflight checks ...
===> Check if Kafka is healthy ...
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/share/java/cp-base-new/slf4j-log4j12- 1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/share/java/cp-base-new/slf4j-simple-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory[]
log4j:WARN No appenders could be found for logger (io.confluent.admin.utils.cli.KafkaReadyCommand).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
然后 pod 以错误代码 1 退出并处于 CrashLoopBackOff 状态。
对于我设置的环境变量KAFKA_REST_BOOTSTRAP_SERVERS
,格式为PLAINTEXT://{host1},PLAINTEXT://{host2}
,KAFKA_REST_LOG4J_ROOT_LOGLEVEL = DEBUG
但它没有显示任何额外的输出。
有没有人有同样的问题?