You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/nodes-nodes-jobs-about.adoc
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,39 +15,39 @@ There are two possible resource types that allow creating run-once objects in {p
15
15
16
16
Job::
17
17
A regular job is a run-once object that creates a task and ensures the job finishes.
18
-
18
+
+
19
19
There are three main types of task suitable to run as a job:
20
-
20
+
+
21
21
* Non-parallel jobs:
22
22
** A job that starts only one pod, unless the pod fails.
23
23
** The job is complete as soon as its pod terminates successfully.
24
-
24
+
+
25
25
* Parallel jobs with a fixed completion count:
26
26
** a job that starts multiple pods.
27
27
** The job represents the overall task and is complete when there is one successful pod for each value in the range `1` to the `completions` value.
28
-
28
+
+
29
29
* Parallel jobs with a work queue:
30
30
** A job with multiple parallel worker processes in a given pod.
31
31
**{product-title} coordinates pods to determine what each should work on or use an external queue service.
32
32
** Each pod is independently capable of determining whether or not all peer pods are complete and that the entire job is done.
33
33
** When any pod from the job terminates with success, no new pods are created.
34
34
** When at least one pod has terminated with success and all pods are terminated, the job is successfully completed.
35
35
** When any pod has exited with success, no other pod should be doing any work for this task or writing any output. Pods should all be in the process of exiting.
36
-
36
+
+
37
37
For more information about how to make use of the different types of job, see link:https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#job-patterns[Job Patterns] in the Kubernetes documentation.
38
38
39
39
Cron job::
40
40
41
41
A job can be scheduled to run multiple times, using a cron job.
42
-
42
+
+
43
43
A _cron job_ builds on a regular job by allowing you to specify
44
44
how the job should be run. Cron jobs are part of the
45
45
link:http://kubernetes.io/docs/user-guide/cron-jobs[Kubernetes] API, which
46
46
can be managed with `oc` commands like other object types.
47
-
47
+
+
48
48
Cron jobs are useful for creating periodic and recurring tasks, like running backups or sending emails.
49
49
Cron jobs can also schedule individual tasks for a specific time, such as if you want to schedule a job for a low activity period. A cron job creates a `Job` object based on the timezone configured on the control plane node that runs the cronjob controller.
50
-
50
+
+
51
51
[WARNING]
52
52
====
53
53
A cron job creates a `Job` object approximately once per execution time of its
Copy file name to clipboardExpand all lines: nodes/jobs/nodes-pods-daemonsets.adoc
+17-10Lines changed: 17 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,23 +29,30 @@ the cluster.
29
29
30
30
== Scheduled by default scheduler
31
31
32
-
A daemon set ensures that all eligible nodes run a copy of a pod. Normally, the node that a pod runs on is selected by the Kubernetes scheduler. However, previously daemon set pods are created and scheduled by the daemon set controller. That introduces the following issues:
32
+
A daemon set ensures that all eligible nodes run a copy of a pod. Normally, the node that a pod runs on is selected by the Kubernetes scheduler. However, daemon set pods are created and scheduled by the daemon set controller. That introduces the following issues:
33
33
34
34
* Inconsistent pod behavior: Normal pods waiting to be scheduled are created and in Pending state, but daemon set pods are not created in `Pending` state. This is confusing to the user.
35
35
* Pod preemption is handled by default scheduler. When preemption is enabled, the daemon set controller will make scheduling decisions without considering pod priority and preemption.
36
36
37
-
The *ScheduleDaemonSetPods* feature, enabled by default in {product-title}, lets you to schedule daemon sets using the default scheduler instead of the daemon set controller, by adding the `NodeAffinity` term to the daemon set pods, instead of the `spec.nodeName` term. The default scheduler is then used to bind the pod to the target host. If node affinity of the daemon set pod already exists, it is replaced. The daemon set controller only performs these operations when creating or modifying daemon set pods, and no changes are made to the `spec.template` of the daemon set.
37
+
The *ScheduleDaemonSetPods* feature, enabled by default in {product-title}, lets you schedule daemon sets using the default scheduler instead of the daemon set controller, by adding the `NodeAffinity` term to the daemon set pods, instead of the `spec.nodeName` term. The default scheduler is then used to bind the pod to the target host. If node affinity of the daemon set pod already exists, it is replaced. The daemon set controller only performs these operations when creating or modifying daemon set pods, and no changes are made to the `spec.template` of the daemon set.
38
38
39
39
[source,yaml]
40
40
----
41
-
nodeAffinity:
42
-
requiredDuringSchedulingIgnoredDuringExecution:
43
-
nodeSelectorTerms:
44
-
- matchFields:
45
-
- key: metadata.name
46
-
operator: In
47
-
values:
48
-
- target-host-name
41
+
kind: Pod
42
+
apiVersion: v1
43
+
metadata:
44
+
name: hello-node-6fbccf8d9-9tmzr
45
+
#...
46
+
spec:
47
+
nodeAffinity:
48
+
requiredDuringSchedulingIgnoredDuringExecution:
49
+
nodeSelectorTerms:
50
+
- matchFields:
51
+
- key: metadata.name
52
+
operator: In
53
+
values:
54
+
- target-host-name
55
+
#...
49
56
----
50
57
51
58
In addition, a `node.kubernetes.io/unschedulable:NoSchedule` toleration is added automatically to daemon set pods. The default scheduler ignores unschedulable Nodes when scheduling daemon set pods.
0 commit comments