I made a cronjob in OpenShift 3.11 with a restartPolicy
of Always. However, when I deleted this cronjob, and the associated jobs, the jobs were (and currently are, as of writing this) still running. I cannot figure out how to stop the job though, and would like to stop the job from running.
I have tried scaling down the deployment to zero pods, deleting the deployment and recreating it (redeploying), deleting the build config and then redoing the build config, deleting the entire project in Open Shift, then recreating the project, running: oc delete all -l app=app
, oc delete jobs --all
, and oc delete pods --all
, none of which has worked so far.
Any suggestions regarding how to delete the cronjob are helpful!
EDIT:
cronjob.yaml:
kind: CronJob
apiVersion: batch/v1beta1
metadata:
name: --redacted--
namespace: --redacted--
selfLink: --redacted--
uid: 5d5cde7d-e8f6-11ea-8ec0-00505682ee91
resourceVersion: '178216471'
creationTimestamp: '2020-08-28T06:19:01Z'
spec:
schedule: 0 8 * * *
concurrencyPolicy: Allow
suspend: false
jobTemplate:
metadata:
creationTimestamp: null
spec:
template:
metadata:
creationTimestamp: null
spec:
containers:
- name: --redacted--
image: byrnedo/alpine-curl
args:
- '--insecure'
- '--location'
- >-
-H 'Authorization: Bearer --redacted--'
- http://--redacted--
- '-XPOST'
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: Always
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
securityContext: {}
schedulerName: default-scheduler
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 1
status:
lastScheduleTime: '2020-08-28T08:00:00Z'
oc get cronjobs
returns no jobs.