Deploy your workloads to specific node pools | Cloud Providers | Northflank Application docs

Cloud Providers /

Deploy your workloads to specific node pools

You can use tags to manage the deployment of workloads on your own cloud-hosted clusters.

You can mark workloads to prefer to be deployed using spot/preemptible instances, or create your own node pool affinities to deploy workloads on specific node pools.

Node pool labels and node pool affinities allow you to create deployment strategies based on the configured resources and availability zones for your node pools. For example, you may want to ensure that some workloads are deployed with more resources, or you may need to deploy workloads in a specific availability zone.

Tags are in early preview and subject to change. Contact to request early access to tags for your account.

Use spot instances

You can tag workloads to prefer spot/preemptible instances, which means they will first try to deploy on node pools that have spot instances enabled.

If there is no capacity on your node pools that use spot instances then these workloads will deploy on on-demand node pools.

Workloads without a tag that enables deployment on spot instances will never be deployed on node pools that use spot instances.

Create a tag to deploy workloads on spot instances

Navigate to tags in your Northflank account, and create a new tag or edit an existing one.

Expand advanced resource settings and select use spot/preemptible instances.

Configure the rest of the tag options and create tag. Any workloads tagged with this tag will use node pools with spot instances enabled, if any are available, the next time they are deployed.

Create node affinity rules

You can add labels to your node pools to create tags with node affinity rules. Node affinity rules can be used in addition to spot/preemptible rules.

You can create multiple node affinity rules for a tag, each with multiple match expressions. This allows you to configure a combination of mandatory and preferential affinity rules for the same workloads.

If a workload's node affinity rules require it to be deployed on a node pool with no availability, it will not be deployed until there is availability on the required node pool. Availability can be increased by removing other workloads, scaling up the number of nodes in the pool, or adding a new node pool with matching labels.


You can create conflicting rules that prevent the deployment of workloads. If you create mandatory match expression rules that do not correspond to any labels on your node pools, a workload with the tag will never be deployed. If an addon is created with rules that prevent it from being deployed, it must be deleted.

Label a node pool

You can add labels to new node pools, but they cannot be modified after creation.

Navigate to your cluster and add a new node pool with your desired configuration.

Expand the advanced section and enter as many labels as required, as a name-value pair. This allows you to create rules across different node pools and clusters by testing against values for a specific label.

Update node pools to deploy the new node pool(s) with your labels.

Create a tag with a node affinity rule

Navigate to tags in your Northflank account, and create a new tag or edit an existing one.

Expand advanced resource settings and add node affinity rule to configure a new affinity rule.


You can select whether the rule is a preference or requirement by selecting preference. This will show a weight value, which can be set between 1 and 100, with higher weighted preferences being applied first.

If the rule is a preference, workloads will be deployed depending on the availability (capacity) of a node pool. If a workload cannot be deployed on a node pool that matches a higher weighted rule, the next highest weighted rule will be used to determine the node pool the workload is deployed on.

If the rule is not a preference, the workload will only be deployed on a node pool matching the affinity rule. If there is no availability on node pools that match the rule, the workload will not be deployed.

Match expression rules

You can add multiple match expression rules to an affinity rule, and each match expression will be evaluated your node pool labels. Enter a key, which is the name of the node pool label to check, and the values to check for in that label.

Choose the operator to evaluate the expression, In, or NotIn, depending on your requirement. In will ensure that the node pool has a label that contains the value before deploying the workload, and NotIn will deploy the workload on node pools that do not contain the value in the specified label.

Tag workloads

You can tag workloads from either the resource list, or in the resource itself. From the list of resources you can hover next to a resource's name, to bring up the tag button . Alternatively click through to a resource to find the tag button Add tags. Resources with tags already present will show the existing tags in the resource overview, or the tag button in the resource list.

Hover over the button to reveal the tag menu and select the tags you want to assign to the resource, then click save.


Adding or removing a tag will not take effect until the workload is restarted.

Tagged workloads will use all the deployment behaviours defined in their tags, for each tag.

© 2023 Northflank Ltd. All rights reserved.