User-Defined Scheduling and Pod Placement
This section describes how to resolve unschedulable pods issue that may arise by using single node label for scheduling, node affinity, and pod placement in CDL pods.
Issue Description
The nodeType parameter controls scheduling, node affinity, and pod placement in CDL. Currently, this parameter is configured with a single node label value smi.cisco.com/node-type. When CDL is configured to its full node capacity, the pods are marked as unschedulable (sometimes) because of the single node label usage.
Identifying the Issue
The CDL pods are marked as unschedulable.
Possible Causes
The usage of single node label for scheduling, node affinity, and pod placement.
Resolution
You can control different CDL pod types using separate node labels. To create separate node labels:
-
(Mandatory) Create smi.cisco.com/node-type label on all the nodes used for CDL through SMI Cluster Manager Ops Center CLI.
-
Create labels for CDL pods as specified in the following table:
Pods
Label
Value
CDL Endpoint pods
smi.cisco.com/cdl-ep
true
CDL Slot pods
smi.cisco.com/cdl-slot-<MAP Id 1..n>
true
CDL Index pods
smi.cisco.com/cdl-index-<MAP Id 1..n>
true
NoteThis configuration is required only for user-defined scheduling.
Example
The following example shows how to create separate node labels for CDL which uses four different nodes with two endpoint replicas, four Slot maps (with two replicas each) and two Index maps (with two replicas each).
Node 1 | Node-2 | Node-3 | Node-4 |
---|---|---|---|
Pod: slot-1-0 | Pod: slot-1-1 | Pod: slot-2-0 | Pod: slot-2-1 |
Label: cdl-slot-1 | Label: cdl-slot-1 | Label: cdl-slot-2 | Label: cdl-slot-2 |
Pod: slot-3-0 | Pod: slot-3-1 | Pod: slot-4-0 | Pod: slot-4-1 |
Label: cdl-slot-3 | Label: cdl-slot-3 | Label: cdl-slot-4 | Label: cdl-slot-4 |
Pod: index-1-0 | Pod: index-1-1 | Pod: index-2-0 | Pod: index-2-1 |
Label: cdl-index-1 | Label: cdl-index-1 | Label: cdl-index-2 | Label: cdl-index-2 |
Pod: ep-0 | Pod: ep-2 | ||
Label: cdl-ep | Label: cdl-ep | Label: cdl-ep | Label: cdl-ep |
clusters user-k8s
nodes session1
k8s node-labels smi.cisco.com/cdl-ep true
exit
k8s node-labels smi.cisco.com/cdl-index-1 true
exit
k8s node-labels smi.cisco.com/cdl-slot-1 true
exit
k8s node-labels smi.cisco.com/cdl-slot-3 true
exit
k8s node-labels smi.cisco.com/node-type session
exit
exit
exit
clusters user-k8s
nodes session2
k8s node-labels smi.cisco.com/cdl-ep true
exit
k8s node-labels smi.cisco.com/cdl-index-1 true
exit
k8s node-labels smi.cisco.com/cdl-slot-1 true
exit
k8s node-labels smi.cisco.com/cdl-slot-3 true
exit
k8s node-labels smi.cisco.com/node-type session
exit
exit
exit
clusters user-k8s
nodes session3
k8s node-labels smi.cisco.com/cdl-ep true
exit
k8s node-labels smi.cisco.com/cdl-index-2 true
exit
k8s node-labels smi.cisco.com/cdl-slot-2 true
exit
k8s node-labels smi.cisco.com/cdl-slot-4 true
exit
k8s node-labels smi.cisco.com/node-type session
exit
exit
exit
clusters user-k8s
nodes session3
k8s node-labels smi.cisco.com/cdl-ep true
exit
k8s node-labels smi.cisco.com/cdl-index-2 true
exit
k8s node-labels smi.cisco.com/cdl-slot-2 true
exit
k8s node-labels smi.cisco.com/cdl-slot-4 true
exit
k8s node-labels smi.cisco.com/node-type session
exit
exit
exit
cdl label-config session
endpoint key smi.cisco.com/cdl-ep
endpoint value true
slot map 1
key smi.cisco.com/cdl-slot-1
value true
slot map 2
key smi.cisco.com/cdl-slot-2
value true
slot map 3
key smi.cisco.com/cdl-slot-3
value true
slot map 4
key smi.cisco.com/cdl-slot-4
value true
index map 1
key smi.cisco.com/cdl-index-1
value true
index map 2
key smi.cisco.com/cdl-index-2
value true
cdl datastore session
label-config session
endpoint replica 2
index replica 2
index map 2
slot replica 2
slot map 4
exit