Skip to main content
Version: 1.4.0

Labels and Annotations in YuniKorn

Labels and Annotations in YuniKorn

YuniKorn utilizes several Kubernetes labels and annotations to support various features:

Labels in YuniKorn

NameDescription
applicationIdAssociates this pod with an application.
queueSelects the YuniKorn queue this application should be scheduled in. This may be ignored if a placement policy is in effect.
SparkLabelAppID Alternative method of specifying applicationId used by Spark Operator if the label applicationId and annotation yunikorn.apache.org/app-id unset.
disableStateAwareIf present, disables the YuniKorn state-aware scheduling policy for this pod. Set internally by the YuniKorn admission controller.
placeholderSet if this pod represents a placeholder for gang scheduling. Set internally by YuniKorn.

Annotations in YuniKorn

All annotations are under the namespace yunikorn.apache.org. For example yunikorn.apache.org/app-id.

NameDescription
app-idAssoiates this pod with an application.
The priority of applicationID is determined by: annotation yunikorn.apache.org/app-id > label applicationId > label SparkLabelAppID.
queueSelects the YuniKorn queue this application should be scheduled in.
The priority of queue is determined by: label queue > annotation yunikorn.apache.org/queue > default.
task-group-nameSets the task group name this pod belongs to for the purposes of gang scheduling. It must be listed within task-groups.
task-groupsDefines the set of task groups for this application for gang scheduling. Each pod within an application must define all task groups.
schedulingPolicyParametersArbitrary key-value pairs used to customize scheduling policies such as gang scheduling.
placeholderSet if this pod represents a placeholder for gang scheduling. Set internally by YuniKorn.
allow-preemptionThe allow-preemption annotation can be set on the Pod or PriorityClass object. The annotation in Pod takes priority over PriorityClass. It will trigger opt out of preemption for pods. Further details can be found in the DaemonSet Scheduling using Simple Preemptor documentation.
parentqueueDefine a parent queue for a set of K8s namespaces. Further details can be found in the Resource Quota Management documentation.
namespace.quotaSet the maximum capacity of the queue mapped to this namespace. Further details can be found in the Resource Quota Management documentation.
[DEPRECATED] namespace.max.cpuReplaced with namespace.quota since version 1.2.0
[DEPRECATED] namespace.max.memoryReplaced with namespace.quota since version 1.2.0
namespace.enableYuniKornControls which namespaces will have pods forwarded to Yunikorn for scheduling. Further details can be found in the Service Configuration #admission-controller-filtering-settingsdocumentation.
namespace.generateAppIdControls which namespaces will have pods labeled with an applicationId. Further details can be found in the Service Configuration #admission-controller-filtering-settings documentation.

For more details surrounding gang-scheduling labels and annotations, please refer to the documentation on gang scheduling.