The Plot
We're setting up a Kubernetes enviornment using RedHat's OCP.
The application that we've been given from our provider in the form of Helm charts and container images, provides a pod that basically just runs bash. From what I understand, their suggestion is that we do oc rsh <pod> do_something.sh for each of the somethings we want to do.
The Problem
I know enough about containers to be dangerous; I've never run them at anything even approaching scale. Like, I've started a couple hundred salt minions on my laptop using docker compose.
The approach of having a bash container just to rsh into and run commands in seems... silly.
The Question
Is there any non-trivial performance penalty, or any risk or downside at all, to running these commands as a Job in kubernetes instead? Something like
apiVersion: batch/v1 kind: Job metadata: name: something_doer spec: template: spec: containers: - name: something_doer image: that_bash_image:42 command: ["do_something.sh"] restartPolicy: Never backoffLimit: 5 Is there any reason why we would not want to launch this via kubectl apply (or oc apply)?