K8s lifecycle preStop for nginx pod

Trigger pre stop, to let the nginx pod consume the transactions while no new incoming connections

lifecycle:                                                              
          preStop:                                                              
            exec:                                                               
              command:                                                          
              - /bin/sh                                                         
              - -c                                                              
              - curl test.xxx.com/prestop-sleep --resolve test.xxx.com:80:127.0.0.1; sleep 60; /wait-shutdown

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *