I am stuck in a situation where my automated jobs stuck in an infinite loop for a docker container. Now I want to stop that operation by some command(s) using kubectl
Note: I don't want to restart the container but to stop the current running job (operation).
If you want to immediately remove resources from API you can use these following flags.
kubectl delete pod $POD_NAME --force --grace-period=0
Keep in mind that when you delete the Resources forcefully there is a chance of data loses, here is the detail termination-of-pods
you can get further options and information with
kubectl delete pods --help