1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/snippets/multi-arch-schedule-nodeaffinity.adoc

31 lines
889 B
Plaintext

:_mod-docs-content-type: SNIPPET
Using `nodeAffinity` to schedule nodes with specific architectures:: You can allow a workload to be scheduled on only a set of nodes with architectures supported by its images, you can set the `spec.affinity.nodeAffinity` field in your pod's template specification.
+
.Example deployment with node affinity set
--
[source,yaml]
----
apiVersion: apps/v1
kind: Deployment
metadata: # ...
spec:
# ...
template:
# ...
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values: <1>
- amd64
- arm64
----
<1> Specify the supported architectures. Valid values include `amd64`,`arm64`, or both values.
[source,yaml]
--