qdzzyb
V2EX  ›  问与答

一个 kafka consumer 在 k8s 里 该如何设置存活检测

  •  
  •   qdzzyb · Aug 23, 2020 · 1725 views
    This topic created in 2095 days ago, the information mentioned may be changed or developed.

    一个单进程的消费程序

    def main():
        while True:
            ... do something...
    
    Supplement 1  ·  Aug 23, 2020
    大佬在哪里
    2 replies    2020-08-23 19:35:03 +08:00
    rrfeng
        1
    rrfeng  
       Aug 23, 2020
    你这个不用设置,死了进程就没了,自然 container 就没了啊
    keepfun
        2
    keepfun  
       Aug 23, 2020 via iPhone
    实在想检测的话 可以起一个简单的 http 接口 直接用这个链接或者 tcp 端口检测
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1571 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 16:42 · PVG 00:42 · LAX 09:42 · JFK 12:42
    ♥ Do have faith in what you're doing.