v2alpha1.ScheduledJob

You are viewing documentation for a release that is no longer supported. The latest supported version of version 3 is [3.11]. For the most recent version 4, see [4]

You are viewing documentation for a release that is no longer supported. The latest supported version of version 3 is [3.11]. For the most recent version 4, see [4]

Description

CronJob represents the configuration of a single cron job.

Object Schema

Expand or mouse-over a field for more information about it.

  1. apiVersion:
  2. kind:
  3. metadata:
  4. annotations:
  5. [string]:
  6. clusterName:
  7. creationTimestamp:
  8. deletionGracePeriodSeconds:
  9. deletionTimestamp:
  10. finalizers:
  11. - [string]:
  12. generateName:
  13. generation:
  14. initializers:
  15. pending:
  16. - name:
  17. result:
  18. apiVersion:
  19. code:
  20. details:
  21. causes:
  22. - field:
  23. message:
  24. reason:
  25. group:
  26. kind:
  27. name:
  28. retryAfterSeconds:
  29. uid:
  30. kind:
  31. message:
  32. metadata:
  33. resourceVersion:
  34. selfLink:
  35. reason:
  36. status:
  37. labels:
  38. [string]:
  39. name:
  40. namespace:
  41. ownerReferences:
  42. - apiVersion:
  43. blockOwnerDeletion:
  44. controller:
  45. kind:
  46. name:
  47. uid:
  48. resourceVersion:
  49. selfLink:
  50. uid:
  51. spec:
  52. concurrencyPolicy:
  53. failedJobsHistoryLimit:
  54. jobTemplate:
  55. metadata:
  56. annotations:
  57. [string]:
  58. clusterName:
  59. creationTimestamp:
  60. deletionGracePeriodSeconds:
  61. deletionTimestamp:
  62. finalizers:
  63. - [string]:
  64. generateName:
  65. generation:
  66. initializers:
  67. pending:
  68. - name:
  69. result:
  70. apiVersion:
  71. code:
  72. details:
  73. causes:
  74. - field:
  75. message:
  76. reason:
  77. group:
  78. kind:
  79. name:
  80. retryAfterSeconds:
  81. uid:
  82. kind:
  83. message:
  84. metadata:
  85. resourceVersion:
  86. selfLink:
  87. reason:
  88. status:
  89. labels:
  90. [string]:
  91. name:
  92. namespace:
  93. ownerReferences:
  94. - apiVersion:
  95. blockOwnerDeletion:
  96. controller:
  97. kind:
  98. name:
  99. uid:
  100. resourceVersion:
  101. selfLink:
  102. uid:
  103. spec:
  104. activeDeadlineSeconds:
  105. completions:
  106. manualSelector:
  107. parallelism:
  108. selector:
  109. matchExpressions:
  110. - key:
  111. operator:
  112. values:
  113. - [string]:
  114. matchLabels:
  115. [string]:
  116. template:
  117. metadata:
  118. annotations:
  119. [string]:
  120. clusterName:
  121. creationTimestamp:
  122. deletionGracePeriodSeconds:
  123. deletionTimestamp:
  124. finalizers:
  125. - [string]:
  126. generateName:
  127. generation:
  128. initializers:
  129. pending:
  130. - name:
  131. result:
  132. apiVersion:
  133. code:
  134. details:
  135. causes:
  136. - field:
  137. message:
  138. reason:
  139. group:
  140. kind:
  141. name:
  142. retryAfterSeconds:
  143. uid:
  144. kind:
  145. message:
  146. metadata:
  147. resourceVersion:
  148. selfLink:
  149. reason:
  150. status:
  151. labels:
  152. [string]:
  153. name:
  154. namespace:
  155. ownerReferences:
  156. - apiVersion:
  157. blockOwnerDeletion:
  158. controller:
  159. kind:
  160. name:
  161. uid:
  162. resourceVersion:
  163. selfLink:
  164. uid:
  165. spec:
  166. activeDeadlineSeconds:
  167. affinity:
  168. nodeAffinity:
  169. preferredDuringSchedulingIgnoredDuringExecution:
  170. - preference:
  171. - matchExpressions:
  172. - - key:
  173. operator:
  174. values:
  175. - [string]:
  176. weight:
  177. requiredDuringSchedulingIgnoredDuringExecution:
  178. nodeSelectorTerms:
  179. - matchExpressions:
  180. - - key:
  181. operator:
  182. values:
  183. - [string]:
  184. podAffinity:
  185. preferredDuringSchedulingIgnoredDuringExecution:
  186. - podAffinityTerm:
  187. - labelSelector:
  188. - matchExpressions:
  189. - - key:
  190. operator:
  191. values:
  192. - [string]:
  193. matchLabels:
  194. [string]:
  195. namespaces:
  196. - [string]:
  197. topologyKey:
  198. weight:
  199. requiredDuringSchedulingIgnoredDuringExecution:
  200. - labelSelector:
  201. - matchExpressions:
  202. - - key:
  203. operator:
  204. values:
  205. - [string]:
  206. matchLabels:
  207. [string]:
  208. namespaces:
  209. - [string]:
  210. topologyKey:
  211. podAntiAffinity:
  212. preferredDuringSchedulingIgnoredDuringExecution:
  213. - podAffinityTerm:
  214. - labelSelector:
  215. - matchExpressions:
  216. - - key:
  217. operator:
  218. values:
  219. - [string]:
  220. matchLabels:
  221. [string]:
  222. namespaces:
  223. - [string]:
  224. topologyKey:
  225. weight:
  226. requiredDuringSchedulingIgnoredDuringExecution:
  227. - labelSelector:
  228. - matchExpressions:
  229. - - key:
  230. operator:
  231. values:
  232. - [string]:
  233. matchLabels:
  234. [string]:
  235. namespaces:
  236. - [string]:
  237. topologyKey:
  238. automountServiceAccountToken:
  239. containers:
  240. - args:
  241. - - [string]:
  242. command:
  243. - [string]:
  244. env:
  245. - name:
  246. value:
  247. valueFrom:
  248. configMapKeyRef:
  249. key:
  250. name:
  251. optional:
  252. fieldRef:
  253. apiVersion:
  254. fieldPath:
  255. resourceFieldRef:
  256. containerName:
  257. divisor:
  258. resource:
  259. secretKeyRef:
  260. key:
  261. name:
  262. optional:
  263. envFrom:
  264. - configMapRef:
  265. - name:
  266. optional:
  267. prefix:
  268. secretRef:
  269. name:
  270. optional:
  271. image:
  272. imagePullPolicy:
  273. lifecycle:
  274. postStart:
  275. exec:
  276. command:
  277. - [string]:
  278. httpGet:
  279. host:
  280. httpHeaders:
  281. - name:
  282. value:
  283. path:
  284. port:
  285. scheme:
  286. tcpSocket:
  287. host:
  288. port:
  289. preStop:
  290. exec:
  291. command:
  292. - [string]:
  293. httpGet:
  294. host:
  295. httpHeaders:
  296. - name:
  297. value:
  298. path:
  299. port:
  300. scheme:
  301. tcpSocket:
  302. host:
  303. port:
  304. livenessProbe:
  305. exec:
  306. command:
  307. - [string]:
  308. failureThreshold:
  309. httpGet:
  310. host:
  311. httpHeaders:
  312. - name:
  313. value:
  314. path:
  315. port:
  316. scheme:
  317. initialDelaySeconds:
  318. periodSeconds:
  319. successThreshold:
  320. tcpSocket:
  321. host:
  322. port:
  323. timeoutSeconds:
  324. name:
  325. ports:
  326. - containerPort:
  327. hostIP:
  328. hostPort:
  329. name:
  330. protocol:
  331. readinessProbe:
  332. exec:
  333. command:
  334. - [string]:
  335. failureThreshold:
  336. httpGet:
  337. host:
  338. httpHeaders:
  339. - name:
  340. value:
  341. path:
  342. port:
  343. scheme:
  344. initialDelaySeconds:
  345. periodSeconds:
  346. successThreshold:
  347. tcpSocket:
  348. host:
  349. port:
  350. timeoutSeconds:
  351. resources:
  352. limits:
  353. [string]:
  354. requests:
  355. [string]:
  356. securityContext:
  357. capabilities:
  358. add:
  359. - [string]:
  360. drop:
  361. - [string]:
  362. privileged:
  363. readOnlyRootFilesystem:
  364. runAsNonRoot:
  365. runAsUser:
  366. seLinuxOptions:
  367. level:
  368. role:
  369. type:
  370. user:
  371. stdin:
  372. stdinOnce:
  373. terminationMessagePath:
  374. terminationMessagePolicy:
  375. tty:
  376. volumeMounts:
  377. - mountPath:
  378. name:
  379. readOnly:
  380. subPath:
  381. workingDir:
  382. dnsPolicy:
  383. hostAliases:
  384. - hostnames:
  385. - - [string]:
  386. ip:
  387. hostIPC:
  388. hostNetwork:
  389. hostPID:
  390. hostname:
  391. imagePullSecrets:
  392. - name:
  393. initContainers:
  394. - args:
  395. - - [string]:
  396. command:
  397. - [string]:
  398. env:
  399. - name:
  400. value:
  401. valueFrom:
  402. configMapKeyRef:
  403. key:
  404. name:
  405. optional:
  406. fieldRef:
  407. apiVersion:
  408. fieldPath:
  409. resourceFieldRef:
  410. containerName:
  411. divisor:
  412. resource:
  413. secretKeyRef:
  414. key:
  415. name:
  416. optional:
  417. envFrom:
  418. - configMapRef:
  419. - name:
  420. optional:
  421. prefix:
  422. secretRef:
  423. name:
  424. optional:
  425. image:
  426. imagePullPolicy:
  427. lifecycle:
  428. postStart:
  429. exec:
  430. command:
  431. - [string]:
  432. httpGet:
  433. host:
  434. httpHeaders:
  435. - name:
  436. value:
  437. path:
  438. port:
  439. scheme:
  440. tcpSocket:
  441. host:
  442. port:
  443. preStop:
  444. exec:
  445. command:
  446. - [string]:
  447. httpGet:
  448. host:
  449. httpHeaders:
  450. - name:
  451. value:
  452. path:
  453. port:
  454. scheme:
  455. tcpSocket:
  456. host:
  457. port:
  458. livenessProbe:
  459. exec:
  460. command:
  461. - [string]:
  462. failureThreshold:
  463. httpGet:
  464. host:
  465. httpHeaders:
  466. - name:
  467. value:
  468. path:
  469. port:
  470. scheme:
  471. initialDelaySeconds:
  472. periodSeconds:
  473. successThreshold:
  474. tcpSocket:
  475. host:
  476. port:
  477. timeoutSeconds:
  478. name:
  479. ports:
  480. - containerPort:
  481. hostIP:
  482. hostPort:
  483. name:
  484. protocol:
  485. readinessProbe:
  486. exec:
  487. command:
  488. - [string]:
  489. failureThreshold:
  490. httpGet:
  491. host:
  492. httpHeaders:
  493. - name:
  494. value:
  495. path:
  496. port:
  497. scheme:
  498. initialDelaySeconds:
  499. periodSeconds:
  500. successThreshold:
  501. tcpSocket:
  502. host:
  503. port:
  504. timeoutSeconds:
  505. resources:
  506. limits:
  507. [string]:
  508. requests:
  509. [string]:
  510. securityContext:
  511. capabilities:
  512. add:
  513. - [string]:
  514. drop:
  515. - [string]:
  516. privileged:
  517. readOnlyRootFilesystem:
  518. runAsNonRoot:
  519. runAsUser:
  520. seLinuxOptions:
  521. level:
  522. role:
  523. type:
  524. user:
  525. stdin:
  526. stdinOnce:
  527. terminationMessagePath:
  528. terminationMessagePolicy:
  529. tty:
  530. volumeMounts:
  531. - mountPath:
  532. name:
  533. readOnly:
  534. subPath:
  535. workingDir:
  536. nodeName:
  537. nodeSelector:
  538. [string]:
  539. restartPolicy:
  540. schedulerName:
  541. securityContext:
  542. fsGroup:
  543. runAsNonRoot:
  544. runAsUser:
  545. seLinuxOptions:
  546. level:
  547. role:
  548. type:
  549. user:
  550. supplementalGroups:
  551. - [integer]:
  552. serviceAccount:
  553. serviceAccountName:
  554. subdomain:
  555. terminationGracePeriodSeconds:
  556. tolerations:
  557. - effect:
  558. key:
  559. operator:
  560. tolerationSeconds:
  561. value:
  562. volumes:
  563. - awsElasticBlockStore:
  564. - fsType:
  565. partition:
  566. readOnly:
  567. volumeID:
  568. azureDisk:
  569. cachingMode:
  570. diskName:
  571. diskURI:
  572. fsType:
  573. kind:
  574. readOnly:
  575. azureFile:
  576. readOnly:
  577. secretName:
  578. shareName:
  579. cephfs:
  580. monitors:
  581. - [string]:
  582. path:
  583. readOnly:
  584. secretFile:
  585. secretRef:
  586. name:
  587. user:
  588. cinder:
  589. fsType:
  590. readOnly:
  591. volumeID:
  592. configMap:
  593. defaultMode:
  594. items:
  595. - key:
  596. mode:
  597. path:
  598. name:
  599. optional:
  600. downwardAPI:
  601. defaultMode:
  602. items:
  603. - fieldRef:
  604. - apiVersion:
  605. fieldPath:
  606. mode:
  607. path:
  608. resourceFieldRef:
  609. containerName:
  610. divisor:
  611. resource:
  612. emptyDir:
  613. medium:
  614. sizeLimit:
  615. fc:
  616. fsType:
  617. lun:
  618. readOnly:
  619. targetWWNs:
  620. - [string]:
  621. flexVolume:
  622. driver:
  623. fsType:
  624. options:
  625. [string]:
  626. readOnly:
  627. secretRef:
  628. name:
  629. flocker:
  630. datasetName:
  631. datasetUUID:
  632. gcePersistentDisk:
  633. fsType:
  634. partition:
  635. pdName:
  636. readOnly:
  637. gitRepo:
  638. directory:
  639. repository:
  640. revision:
  641. glusterfs:
  642. endpoints:
  643. path:
  644. readOnly:
  645. hostPath:
  646. path:
  647. iscsi:
  648. chapAuthDiscovery:
  649. chapAuthSession:
  650. fsType:
  651. iqn:
  652. iscsiInterface:
  653. lun:
  654. portals:
  655. - [string]:
  656. readOnly:
  657. secretRef:
  658. name:
  659. targetPortal:
  660. name:
  661. nfs:
  662. path:
  663. readOnly:
  664. server:
  665. persistentVolumeClaim:
  666. claimName:
  667. readOnly:
  668. photonPersistentDisk:
  669. fsType:
  670. pdID:
  671. portworxVolume:
  672. fsType:
  673. readOnly:
  674. volumeID:
  675. projected:
  676. defaultMode:
  677. sources:
  678. - configMap:
  679. - items:
  680. - - key:
  681. mode:
  682. path:
  683. name:
  684. optional:
  685. downwardAPI:
  686. items:
  687. - fieldRef:
  688. - apiVersion:
  689. fieldPath:
  690. mode:
  691. path:
  692. resourceFieldRef:
  693. containerName:
  694. divisor:
  695. resource:
  696. secret:
  697. items:
  698. - key:
  699. mode:
  700. path:
  701. name:
  702. optional:
  703. quobyte:
  704. group:
  705. readOnly:
  706. registry:
  707. user:
  708. volume:
  709. rbd:
  710. fsType:
  711. image:
  712. keyring:
  713. monitors:
  714. - [string]:
  715. pool:
  716. readOnly:
  717. secretRef:
  718. name:
  719. user:
  720. scaleIO:
  721. fsType:
  722. gateway:
  723. protectionDomain:
  724. readOnly:
  725. secretRef:
  726. name:
  727. sslEnabled:
  728. storageMode:
  729. storagePool:
  730. system:
  731. volumeName:
  732. secret:
  733. defaultMode:
  734. items:
  735. - key:
  736. mode:
  737. path:
  738. optional:
  739. secretName:
  740. storageos:
  741. fsType:
  742. readOnly:
  743. secretRef:
  744. name:
  745. volumeName:
  746. volumeNamespace:
  747. vsphereVolume:
  748. fsType:
  749. storagePolicyID:
  750. storagePolicyName:
  751. volumePath:
  752. schedule:
  753. startingDeadlineSeconds:
  754. successfulJobsHistoryLimit:
  755. suspend:
  756. status:
  757. active:
  758. - apiVersion:
  759. fieldPath:
  760. kind:
  761. name:
  762. namespace:
  763. resourceVersion:
  764. uid:
  765. lastScheduleTime:

Operations

Create a ScheduledJob

Create a ScheduledJob

HTTP request

  1. POST /apis/batch/v2alpha1/scheduledjobs HTTP/1.1
  2. Authorization: Bearer $TOKEN
  3. Accept: application/json
  4. Connection: close
  5. Content-Type: application/json'
  6. {
  7. "kind": "CronJob",
  8. "apiVersion": "batch/v2alpha1",
  9. ...
  10. }

Curl request

  1. $ curl -k \
  2. -X POST \
  3. -d @- \
  4. -H "Authorization: Bearer $TOKEN" \
  5. -H 'Accept: application/json' \
  6. -H 'Content-Type: application/json' \
  7. https://$ENDPOINT/apis/batch/v2alpha1/scheduledjobs <<'EOF'
  8. {
  9. "kind": "CronJob",
  10. "apiVersion": "batch/v2alpha1",
  11. ...
  12. }
  13. EOF

HTTP body

ParameterSchema

body

v2alpha1.CronJob

Query parameters

ParameterDescription

pretty

If ‘true’, then the output is pretty printed.

Responses

HTTP CodeSchema

200 OK

v2alpha1.CronJob

401 Unauthorized

Consumes

  • */*

Produces

  • application/json

  • application/yaml

  • application/vnd.kubernetes.protobuf

Create a ScheduledJob in a namespace

Create a ScheduledJob

HTTP request

  1. POST /apis/batch/v2alpha1/namespaces/$NAMESPACE/scheduledjobs HTTP/1.1
  2. Authorization: Bearer $TOKEN
  3. Accept: application/json
  4. Connection: close
  5. Content-Type: application/json'
  6. {
  7. "kind": "CronJob",
  8. "apiVersion": "batch/v2alpha1",
  9. ...
  10. }

Curl request

  1. $ curl -k \
  2. -X POST \
  3. -d @- \
  4. -H "Authorization: Bearer $TOKEN" \
  5. -H 'Accept: application/json' \
  6. -H 'Content-Type: application/json' \
  7. https://$ENDPOINT/apis/batch/v2alpha1/namespaces/$NAMESPACE/scheduledjobs <<'EOF'
  8. {
  9. "kind": "CronJob",
  10. "apiVersion": "batch/v2alpha1",
  11. ...
  12. }
  13. EOF

HTTP body

ParameterSchema

body

v2alpha1.CronJob

Path parameters

ParameterDescription

namespace

object name and auth scope, such as for teams and projects

Query parameters

ParameterDescription

pretty

If ‘true’, then the output is pretty printed.

Responses

HTTP CodeSchema

200 OK

v2alpha1.CronJob

401 Unauthorized

Consumes

  • */*

Produces

  • application/json

  • application/yaml

  • application/vnd.kubernetes.protobuf

Get a ScheduledJob in a namespace

Read the specified ScheduledJob

HTTP request

  1. GET /apis/batch/v2alpha1/namespaces/$NAMESPACE/scheduledjobs/$NAME HTTP/1.1
  2. Authorization: Bearer $TOKEN
  3. Accept: application/json
  4. Connection: close

Curl request

  1. $ curl -k \
  2. -H "Authorization: Bearer $TOKEN" \
  3. -H 'Accept: application/json' \
  4. https://$ENDPOINT/apis/batch/v2alpha1/namespaces/$NAMESPACE/scheduledjobs/$NAME

Path parameters

ParameterDescription

name

name of the ScheduledJob

namespace

object name and auth scope, such as for teams and projects

Query parameters

ParameterDescription

pretty

If ‘true’, then the output is pretty printed.

exact

Should the export be exact. Exact export maintains cluster-specific fields like ‘Namespace’.

export

Should this value be exported. Export strips fields that a user can not specify.

Responses

HTTP CodeSchema

200 OK

v2alpha1.CronJob

401 Unauthorized

Consumes

  • */*

Produces

  • application/json

  • application/yaml

  • application/vnd.kubernetes.protobuf

Get all ScheduledJobs

List or watch objects of kind ScheduledJob

HTTP request

  1. GET /apis/batch/v2alpha1/scheduledjobs HTTP/1.1
  2. Authorization: Bearer $TOKEN
  3. Accept: application/json
  4. Connection: close

Curl request

  1. $ curl -k \
  2. -H "Authorization: Bearer $TOKEN" \
  3. -H 'Accept: application/json' \
  4. https://$ENDPOINT/apis/batch/v2alpha1/scheduledjobs

Query parameters

ParameterDescription

pretty

If ‘true’, then the output is pretty printed.

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

includeUninitialized

If true, partially initialized resources are included in the response.

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

timeoutSeconds

Timeout for the list/watch call.

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

Responses

HTTP CodeSchema

200 OK

v2alpha1.CronJobList

401 Unauthorized

Consumes

  • */*

Produces

  • application/json

  • application/yaml

  • application/vnd.kubernetes.protobuf

  • application/json;stream=watch

  • application/vnd.kubernetes.protobuf;stream=watch

Get all ScheduledJobs in a namespace

List or watch objects of kind ScheduledJob

HTTP request

  1. GET /apis/batch/v2alpha1/namespaces/$NAMESPACE/scheduledjobs HTTP/1.1
  2. Authorization: Bearer $TOKEN
  3. Accept: application/json
  4. Connection: close

Curl request

  1. $ curl -k \
  2. -H "Authorization: Bearer $TOKEN" \
  3. -H 'Accept: application/json' \
  4. https://$ENDPOINT/apis/batch/v2alpha1/namespaces/$NAMESPACE/scheduledjobs

Path parameters

ParameterDescription

namespace

object name and auth scope, such as for teams and projects

Query parameters

ParameterDescription

pretty

If ‘true’, then the output is pretty printed.

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

includeUninitialized

If true, partially initialized resources are included in the response.

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

timeoutSeconds

Timeout for the list/watch call.

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

Responses

HTTP CodeSchema

200 OK

v2alpha1.CronJobList

401 Unauthorized

Consumes

  • */*

Produces

  • application/json

  • application/yaml

  • application/vnd.kubernetes.protobuf

  • application/json;stream=watch

  • application/vnd.kubernetes.protobuf;stream=watch

Watch a ScheduledJob in a namespace

Watch changes to an object of kind ScheduledJob

HTTP request

  1. GET /apis/batch/v2alpha1/watch/namespaces/$NAMESPACE/scheduledjobs/$NAME HTTP/1.1
  2. Authorization: Bearer $TOKEN
  3. Accept: application/json
  4. Connection: close

Curl request

  1. $ curl -k \
  2. -H "Authorization: Bearer $TOKEN" \
  3. -H 'Accept: application/json' \
  4. https://$ENDPOINT/apis/batch/v2alpha1/watch/namespaces/$NAMESPACE/scheduledjobs/$NAME

Path parameters

ParameterDescription

name

name of the ScheduledJob

namespace

object name and auth scope, such as for teams and projects

Query parameters

ParameterDescription

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

includeUninitialized

If true, partially initialized resources are included in the response.

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

pretty

If ‘true’, then the output is pretty printed.

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

timeoutSeconds

Timeout for the list/watch call.

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

Responses

HTTP CodeSchema

200 OK

v1.WatchEvent

401 Unauthorized

Consumes

  • */*

Produces

  • application/json

  • application/yaml

  • application/vnd.kubernetes.protobuf

  • application/json;stream=watch

  • application/vnd.kubernetes.protobuf;stream=watch

Watch all ScheduledJobs

Watch individual changes to a list of ScheduledJob

HTTP request

  1. GET /apis/batch/v2alpha1/watch/scheduledjobs HTTP/1.1
  2. Authorization: Bearer $TOKEN
  3. Accept: application/json
  4. Connection: close

Curl request

  1. $ curl -k \
  2. -H "Authorization: Bearer $TOKEN" \
  3. -H 'Accept: application/json' \
  4. https://$ENDPOINT/apis/batch/v2alpha1/watch/scheduledjobs

Query parameters

ParameterDescription

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

includeUninitialized

If true, partially initialized resources are included in the response.

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

pretty

If ‘true’, then the output is pretty printed.

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

timeoutSeconds

Timeout for the list/watch call.

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

Responses

HTTP CodeSchema

200 OK

v1.WatchEvent

401 Unauthorized

Consumes

  • */*

Produces

  • application/json

  • application/yaml

  • application/vnd.kubernetes.protobuf

  • application/json;stream=watch

  • application/vnd.kubernetes.protobuf;stream=watch

Watch all ScheduledJobs in a namespace

Watch individual changes to a list of ScheduledJob

HTTP request

  1. GET /apis/batch/v2alpha1/watch/namespaces/$NAMESPACE/scheduledjobs HTTP/1.1
  2. Authorization: Bearer $TOKEN
  3. Accept: application/json
  4. Connection: close

Curl request

  1. $ curl -k \
  2. -H "Authorization: Bearer $TOKEN" \
  3. -H 'Accept: application/json' \
  4. https://$ENDPOINT/apis/batch/v2alpha1/watch/namespaces/$NAMESPACE/scheduledjobs

Path parameters

ParameterDescription

namespace

object name and auth scope, such as for teams and projects

Query parameters

ParameterDescription

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

includeUninitialized

If true, partially initialized resources are included in the response.

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

pretty

If ‘true’, then the output is pretty printed.

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

timeoutSeconds

Timeout for the list/watch call.

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

Responses

HTTP CodeSchema

200 OK

v1.WatchEvent

401 Unauthorized

Consumes

  • */*

Produces

  • application/json

  • application/yaml

  • application/vnd.kubernetes.protobuf

  • application/json;stream=watch

  • application/vnd.kubernetes.protobuf;stream=watch

Update a ScheduledJob in a namespace

Replace the specified ScheduledJob

HTTP request

  1. PUT /apis/batch/v2alpha1/namespaces/$NAMESPACE/scheduledjobs/$NAME HTTP/1.1
  2. Authorization: Bearer $TOKEN
  3. Accept: application/json
  4. Connection: close
  5. Content-Type: application/json'
  6. {
  7. "kind": "CronJob",
  8. "apiVersion": "batch/v2alpha1",
  9. ...
  10. }

Curl request

  1. $ curl -k \
  2. -X PUT \
  3. -d @- \
  4. -H "Authorization: Bearer $TOKEN" \
  5. -H 'Accept: application/json' \
  6. -H 'Content-Type: application/json' \
  7. https://$ENDPOINT/apis/batch/v2alpha1/namespaces/$NAMESPACE/scheduledjobs/$NAME <<'EOF'
  8. {
  9. "kind": "CronJob",
  10. "apiVersion": "batch/v2alpha1",
  11. ...
  12. }
  13. EOF

HTTP body

ParameterSchema

body

v2alpha1.CronJob

Path parameters

ParameterDescription

name

name of the ScheduledJob

namespace

object name and auth scope, such as for teams and projects

Query parameters

ParameterDescription

pretty

If ‘true’, then the output is pretty printed.

Responses

HTTP CodeSchema

200 OK

v2alpha1.CronJob

401 Unauthorized

Consumes

  • */*

Produces

  • application/json

  • application/yaml

  • application/vnd.kubernetes.protobuf

Patch a ScheduledJob in a namespace

Partially update the specified ScheduledJob

HTTP request

  1. PATCH /apis/batch/v2alpha1/namespaces/$NAMESPACE/scheduledjobs/$NAME HTTP/1.1
  2. Authorization: Bearer $TOKEN
  3. Accept: application/json
  4. Connection: close
  5. Content-Type: application/json-patch+json'
  6. {
  7. ...
  8. }

Curl request

  1. $ curl -k \
  2. -X PATCH \
  3. -d @- \
  4. -H "Authorization: Bearer $TOKEN" \
  5. -H 'Accept: application/json' \
  6. -H 'Content-Type: application/json-patch+json' \
  7. https://$ENDPOINT/apis/batch/v2alpha1/namespaces/$NAMESPACE/scheduledjobs/$NAME <<'EOF'
  8. {
  9. ...
  10. }
  11. EOF

HTTP body

ParameterSchema

body

v1.Patch

Path parameters

ParameterDescription

name

name of the ScheduledJob

namespace

object name and auth scope, such as for teams and projects

Query parameters

ParameterDescription

pretty

If ‘true’, then the output is pretty printed.

Responses

HTTP CodeSchema

200 OK

v2alpha1.CronJob

401 Unauthorized

Consumes

  • application/json-patch+json

  • application/merge-patch+json

  • application/strategic-merge-patch+json

Produces

  • application/json

  • application/yaml

  • application/vnd.kubernetes.protobuf

Delete a ScheduledJob in a namespace

Delete a ScheduledJob

HTTP request

  1. DELETE /apis/batch/v2alpha1/namespaces/$NAMESPACE/scheduledjobs/$NAME HTTP/1.1
  2. Authorization: Bearer $TOKEN
  3. Accept: application/json
  4. Connection: close
  5. Content-Type: application/json'
  6. {
  7. ...
  8. }

Curl request

  1. $ curl -k \
  2. -X DELETE \
  3. -d @- \
  4. -H "Authorization: Bearer $TOKEN" \
  5. -H 'Accept: application/json' \
  6. -H 'Content-Type: application/json' \
  7. https://$ENDPOINT/apis/batch/v2alpha1/namespaces/$NAMESPACE/scheduledjobs/$NAME <<'EOF'
  8. {
  9. ...
  10. }
  11. EOF

HTTP body

ParameterSchema

body

v1.DeleteOptions

Path parameters

ParameterDescription

name

name of the ScheduledJob

namespace

object name and auth scope, such as for teams and projects

Query parameters

ParameterDescription

pretty

If ‘true’, then the output is pretty printed.

gracePeriodSeconds

The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.

orphanDependents

Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the “orphan” finalizer will be added to/removed from the object’s finalizers list. Either this field or PropagationPolicy may be set, but not both.

propagationPolicy

Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.

Responses

HTTP CodeSchema

200 OK

v1.Status

401 Unauthorized

Consumes

  • */*

Produces

  • application/json

  • application/yaml

  • application/vnd.kubernetes.protobuf

Delete all ScheduledJobs in a namespace

Delete collection of ScheduledJob

HTTP request

  1. DELETE /apis/batch/v2alpha1/namespaces/$NAMESPACE/scheduledjobs HTTP/1.1
  2. Authorization: Bearer $TOKEN
  3. Accept: application/json
  4. Connection: close

Curl request

  1. $ curl -k \
  2. -X DELETE \
  3. -H "Authorization: Bearer $TOKEN" \
  4. -H 'Accept: application/json' \
  5. https://$ENDPOINT/apis/batch/v2alpha1/namespaces/$NAMESPACE/scheduledjobs

Path parameters

ParameterDescription

namespace

object name and auth scope, such as for teams and projects

Query parameters

ParameterDescription

pretty

If ‘true’, then the output is pretty printed.

fieldSelector

A selector to restrict the list of returned objects by their fields. Defaults to everything.

includeUninitialized

If true, partially initialized resources are included in the response.

labelSelector

A selector to restrict the list of returned objects by their labels. Defaults to everything.

resourceVersion

When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it’s 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.

timeoutSeconds

Timeout for the list/watch call.

watch

Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

Responses

HTTP CodeSchema

200 OK

v1.Status

401 Unauthorized

Consumes

  • */*

Produces

  • application/json

  • application/yaml

  • application/vnd.kubernetes.protobuf

Get status of a ScheduledJob in a namespace

Read status of the specified ScheduledJob

HTTP request

  1. GET /apis/batch/v2alpha1/namespaces/$NAMESPACE/scheduledjobs/$NAME/status HTTP/1.1
  2. Authorization: Bearer $TOKEN
  3. Accept: application/json
  4. Connection: close

Curl request

  1. $ curl -k \
  2. -H "Authorization: Bearer $TOKEN" \
  3. -H 'Accept: application/json' \
  4. https://$ENDPOINT/apis/batch/v2alpha1/namespaces/$NAMESPACE/scheduledjobs/$NAME/status

Path parameters

ParameterDescription

name

name of the ScheduledJob

namespace

object name and auth scope, such as for teams and projects

Query parameters

ParameterDescription

pretty

If ‘true’, then the output is pretty printed.

Responses

HTTP CodeSchema

200 OK

v2alpha1.CronJob

401 Unauthorized

Consumes

  • */*

Produces

  • application/json

  • application/yaml

  • application/vnd.kubernetes.protobuf

Update status of a ScheduledJob in a namespace

Replace status of the specified ScheduledJob

HTTP request

  1. PUT /apis/batch/v2alpha1/namespaces/$NAMESPACE/scheduledjobs/$NAME/status HTTP/1.1
  2. Authorization: Bearer $TOKEN
  3. Accept: application/json
  4. Connection: close
  5. Content-Type: application/json'
  6. {
  7. "kind": "CronJob",
  8. "apiVersion": "batch/v2alpha1",
  9. ...
  10. }

Curl request

  1. $ curl -k \
  2. -X PUT \
  3. -d @- \
  4. -H "Authorization: Bearer $TOKEN" \
  5. -H 'Accept: application/json' \
  6. -H 'Content-Type: application/json' \
  7. https://$ENDPOINT/apis/batch/v2alpha1/namespaces/$NAMESPACE/scheduledjobs/$NAME/status <<'EOF'
  8. {
  9. "kind": "CronJob",
  10. "apiVersion": "batch/v2alpha1",
  11. ...
  12. }
  13. EOF

HTTP body

ParameterSchema

body

v2alpha1.CronJob

Path parameters

ParameterDescription

name

name of the ScheduledJob

namespace

object name and auth scope, such as for teams and projects

Query parameters

ParameterDescription

pretty

If ‘true’, then the output is pretty printed.

Responses

HTTP CodeSchema

200 OK

v2alpha1.CronJob

401 Unauthorized

Consumes

  • */*

Produces

  • application/json

  • application/yaml

  • application/vnd.kubernetes.protobuf

Patch status of a ScheduledJob in a namespace

Partially update status of the specified ScheduledJob

HTTP request

  1. PATCH /apis/batch/v2alpha1/namespaces/$NAMESPACE/scheduledjobs/$NAME/status HTTP/1.1
  2. Authorization: Bearer $TOKEN
  3. Accept: application/json
  4. Connection: close
  5. Content-Type: application/json-patch+json'
  6. {
  7. ...
  8. }

Curl request

  1. $ curl -k \
  2. -X PATCH \
  3. -d @- \
  4. -H "Authorization: Bearer $TOKEN" \
  5. -H 'Accept: application/json' \
  6. -H 'Content-Type: application/json-patch+json' \
  7. https://$ENDPOINT/apis/batch/v2alpha1/namespaces/$NAMESPACE/scheduledjobs/$NAME/status <<'EOF'
  8. {
  9. ...
  10. }
  11. EOF

HTTP body

ParameterSchema

body

v1.Patch

Path parameters

ParameterDescription

name

name of the ScheduledJob

namespace

object name and auth scope, such as for teams and projects

Query parameters

ParameterDescription

pretty

If ‘true’, then the output is pretty printed.

Responses

HTTP CodeSchema

200 OK

v2alpha1.CronJob

401 Unauthorized

Consumes

  • application/json-patch+json

  • application/merge-patch+json

  • application/strategic-merge-patch+json

Produces

  • application/json

  • application/yaml

  • application/vnd.kubernetes.protobuf