why container instance keeps running the same bash script over and over again

Franko999 161 Reputation points
2020-06-12T07:38:02.667+00:00

Hello,

Im new to the Azure. I have deployed several container instances which run simple bash script which downloads and processes data. I wanted to ask why after getting the job done the container keeps running the bash script over and over again and deletes the already processed files. Please share some experience on how to avoid it.

Best regards,

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
657 questions
{count} votes

1 answer

Sort by: Most helpful
  1. prmanhas-MSFT 17,891 Reputation points Microsoft Employee
    2020-07-01T09:58:05.98+00:00

    @Franko999 Apologies for the delay.

    Can you explain which service are you actually running (ACS or AKS)? Also it would helpful for recommendation if you can share the template you are using to running it.

    In case of AKS (Kubernetes service), you might be running pods (via deployment) in order to run bash scripts which is processing jobs.

    Deployment is not the right way to do so as Kubernetes ensure you always have running pod for the deployment (by the replica count from the deployment). Moreover even after job completion, command would exit, Kubernetes will span another pod and run the command again.

    In AKS, the right type would be jobs .

    0 comments No comments