How to forcefully terminate a pod


Customers may want to forcefully terminate/kill a pod rather than wait until the pod self-destructs. A typical scenario where this can happen is terminating pods showing high CPU utilization resulting in application performance degradation.


In order to forcefully kill pods, it is necessary to scale down the application in order to forcefully terminate the pod. Alternatively, you can also reach out to EY Support by submitting a request to get the pod removed/deleted immediately.

Follow these steps to scale down the application to trigger a forceful termination of the runaway pod:

  1. Confirm if autoscale is enabled:
    eyk autoscale:list -a sfsproduction
    === sfsproduction Autoscale
    --- web:
    Min Replicas: 3
    Max Replicas: 10
    CPU: 200%
  2. Disable autoscale if it was enabled:
    eyk autoscale:unset -a sfsproduction
  3. Then scale down eyk ps:scale web=xxx -a sfsproduction
  4. When the app has been scaled and the pod deleted, you can increase the ps:scale and set autoscale again:
      eyk autoscale:set web --min=xxx --max=xxx --cpu-percent=xxx -a sfsproduction
Note: Killing process 1 (PID 1) does not work because it is the init process. A request was submitted to engineering to make PID 1 a different process on EYK which will make it possible to kill the runaway process using kill -9 PID.


Please sign in to leave a comment.

Powered by Zendesk