I have a simple job that is defined in a YAML file similar to the one below:
apiVersion: batch/v1 kind: Job metadata: name: check_deps spec: template: spec: containers: - name: production-container image: registry.company.com/app:master imagePullPolicy: Always envFrom: - configMapRef: name: production args: - python - check_dependencies restartPolicy: Never
I want to trigger this job from the CI, and receive an information if it failed or succeeded.
Just a simple command like:
kubectl run job --name=check_deps --watch
The documentation says, that I need to create job from yaml, read its output and then delete it in 3 separate steps. I can create a script to do that, but maybe there is a built in solution that would allow me to achieve my goal?
I'm running kubernetes on bare metal CentOs, vesion 1.11 of client and server.