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/nw-metallb-operator-setting-pod-priority-affinity.adoc
+8-8
Original file line number
Diff line number
Diff line change
@@ -7,26 +7,26 @@
7
7
8
8
You can optionally assign pod priority and pod affinity rules to `controller` and `speaker` pods by configuring the `MetalLB` custom resource. The pod priority indicates the relative importance of a pod on a node and schedules the pod based on this priority. Set a high priority on your `controller` or `speaker` pod to ensure scheduling priority over other pods on the node.
9
9
10
-
Pod affinity manages relationships among pods. Assign pod affinity to the `controller` or `speaker` pods to control on what node the scheduler places the pod in the context of pod relationships. For example, using pod affinity rules, you can ensure that these pods are co-located on the same nodes or nodes. This can help optimize network communication and reduce latency between these components.
10
+
Pod affinity manages relationships among pods. Assign pod affinity to the `controller` or `speaker` pods to control on what node the scheduler places the pod in the context of pod relationships. For example, you can use pod affinity rules to ensure that certain pods are located on the same node or nodes, which can help improve network communication and reduce latency between those components.
11
11
12
12
.Prerequisites
13
13
14
14
* You are logged in as a user with `cluster-admin` privileges.
15
15
16
16
* You have installed the MetalLB Operator.
17
17
18
-
* You have started MetalLB on your cluster.
18
+
* You have started the MetalLB Operator on your cluster.
19
19
20
20
.Procedure
21
-
. Create a `PriorityClass` custom resource, such as `myPriorityClass.yaml`, to configure the priority level. This example defines a `PriorityClass` named `high-priority` with a value of `1000000`. Pods that are assigned this priority class will be considered higher-priority during scheduling compared to pods with lower priority classes:
21
+
. Create a `PriorityClass` custom resource, such as `myPriorityClass.yaml`, to configure the priority level. This example defines a `PriorityClass` named `high-priority` with a value of `1000000`. Pods that are assigned this priority class are considered higherpriority during scheduling compared to pods with lower priority classes:
22
22
+
23
23
[source,yaml]
24
24
----
25
25
apiVersion: scheduling.k8s.io/v1
26
26
kind: PriorityClass
27
27
metadata:
28
-
name: high-priority <1>
29
-
value: 1000000 <2>
28
+
name: high-priority
29
+
value: 1000000
30
30
----
31
31
32
32
. Apply the `PriorityClass` custom resource configuration:
@@ -68,7 +68,7 @@ spec:
68
68
----
69
69
+
70
70
<1> Specifies the priority class for the MetalLB controller pods. In this case, it is set to `high-priority`.
71
-
<2> Specifies that you are configuring pod affinity rules. These rules dictate how pods are scheduled in relation to other pods or nodes. This configuration instructs the scheduler to schedule pods that have the label `app: metallb` onto nodes that share the same hostname. This helps to colocate MetalLB-related pods on the same nodes, potentially optimizing network communication, latency, and resource usage between these pods.
71
+
<2> Specifies that you are configuring pod affinity rules. These rules dictate how pods are scheduled in relation to other pods or nodes. This configuration instructs the scheduler to schedule pods that have the label `app: metallb` onto nodes that share the same hostname. This helps to co-locate MetalLB-related pods on the same nodes, potentially optimizing network communication, latency, and resource usage between these pods.
72
72
73
73
. Apply the `MetalLB` custom resource configuration:
* To verify that the scheduler placed pods according to pod affinity rules, view the metadata for the pod's node by running the following command:
99
+
* To verify that the scheduler placed pods according to pod affinity rules, view the metadata for the pod's node or nodes by running the following command:
= Configuring a container runtime class in a MetalLB deployment
7
7
8
-
You can optionally assign a container runtime class to `controller` and `speaker` pods by configuring the `MetalLB` custom resource. For example, for Windows workloads, you can assign a Windows runtime class to the pod, which uses this runtime class for all containers in the pod.
8
+
You can optionally assign a container runtime class to `controller` and `speaker` pods by configuring the MetalLB custom resource. For example, for Windows workloads, you can assign a Windows runtime class to the pod, which uses this runtime class for all containers in the pod.
9
9
10
10
.Prerequisites
11
11
@@ -52,7 +52,7 @@ spec:
52
52
annotations: <1>
53
53
speaker: demo
54
54
----
55
-
<1> This example uses `annotations` to add metadata such as build release information or GitHub pull request information. You can populate annotations with characters not permitted in labels. However, you cannot use annotations to identify or select objects.
55
+
<1> The earlier example uses `annotations` to add metadata such as build release information or GitHub pull request information. You can populate annotations with characters that are no permitted in labels. However, you cannot use annotations to identify or select objects.
56
56
57
57
. Apply the `MetalLB` custom resource configuration:
0 commit comments