Node Affinity
Overview of node affinity (also, node tagging) in Orka. When node affinity is configured, Orka first attempts to deploy to the specified node or group of nodes, before moving to any other nodes.
Quick navigation
Jump to: 1. What is node affinity | 2. How does node affinity work | 3. Caveats
How to use node affinity: API Node Affinity | CLI Node Affinity
If you need to target a specific node or group of nodes during deployment, you can use node affinity (also: node tagging). Based on the tag required
setting, Orka might or might not attempt to deploy on other nodes if the deployment to the tagged node(s) fails.
1. What is node affinity
Node affinity indicates that the tagged node is preferred for the deployment of VMs with the same tag. Orka will first attempt to deploy on any nodes with the respective tag, before moving to the remaining nodes in the environment. Orka will attempt to deploy on other nodes, only if the tag required
setting for the VM is no
.
2. How does node affinity work
Node affinity consists of two parts (performed in any order or any number of times within the current limitations of the feature):
- Assign the tag to a node or a group of nodes
- Create a VM config with the tag and specify if the tag is required OR apply the tag during deployment and specify if it's required
When node affinity is configured, the following rules apply:
- Untagged VMs can be deployed to both tagged and untagged VMs.
- Tagged VMs with
tag required = yes
can be deployed only on nodes with the respective tag. Orka will not attempt to deploy on the remaining nodes in the environment, if the deployment fails. - Tagged VMs with
tag required = no
can be deployed on both tagged and untagged nodes. Orka will first attempt to deploy on the available tagged node(s). If the deployment fails, Orka will then attempt to deploy on the remaining nodes in the environment, if any.
What happens to existing VMs?
VMs already deployed on the newly tagged node are not affected and continue to work as expected. Their owners can still run and manage the VM's lifecycle, regardless of the tag.
To apply a tag to an existing VM config, you need to re-create the config or override its
tag
andtag required
settings during deployment.
3. Caveats
- Node affinity is not available in the Orka Web UI.
- One VM config or VM can have only one tag at a time.
- One node can have multiple tags at a time.
- You can add or remove one tag to one node at a time.
- Tags are case-sensitive.
- Node dedication takes precedence over node affinity.
Orka will first filter the available nodes for deployment by user group. Orka will then attempt to deploy to a tagged node within your user group and proceed afterward based on thetag required
setting. Orka will never attempt to deploy to a node outside of your user group. - Node affinity (with
tag required = yes
) takes precedence over explicitly specifying a node for deployment.
If the node does not match the tag, Orka will not attempt to deploy on it.
What's next
Choose how to work with node affinity in your workflows:
Updated over 1 year ago