About Deploying in a Multi-Architecture Kubernetes Cluster
Kubernetes supports single architecture and multi-architecture clusters. A single architecture cluster is a cluster in which nodes within the cluster use the same computer instruction set. For example, a single-architecture cluster could consist of all arm64
nodes or all amd64
nodes. A multi-architecture cluster is a Kubernetes cluster in which nodes within the cluster may be of different computer instruction sets. For example, a multi-architecture cluster could consist of both amd64
and arm64
nodes.
The TimesTen Operator runs in single and multi-architecture Kubernetes clusters. Pods that are created by the TimesTen Operator run on nodes of the same node type as the TimesTen Operator. For example, if the TimesTen Operator runs on amd64
nodes, Pods created by this TimesTen Operator also run on amd64
nodes.
If you are running the TimesTen Operator in a namespace-scoped environment, you can deploy the TimesTen Operator in one namespace on arm64
nodes (and have it provision and manage TimesTen on arm64
nodes) and you can deploy a second TimesTen Operator in a different namespace on amd64
nodes (and have it provision and manage TimesTen on amd64
nodes). However, if you are running the TimesTen Operator in a cluster-scoped environment, you must use the same node type. For more information about namespace-scoped and cluster-scoped Operators, see About Kubernetes Operators and About the TimesTen Operator.
The affinity
settings of both the TimesTen Operator YAML manifest files and the TimesTen Operator helm charts control whether the Operator and the objects it manages uses arm64
or amd64
nodes. For example, here is a snippet of the affinity
section of a TimesTen Operator YAML manifest file:
# An example affinity definition; this pod will only be assigned to a node
# running on amd64 (the default)
#
# affinity:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: "kubernetes.io/arch"
# operator: In
# values: ["amd64"]
...
affinity
section. However, if you are using a multi-architecture cluster, you must instruct Kubernetes to deploy the TimesTen Operator on a specific architecture. Here's how:
-
Uncomment the
.affinity.nodeAffinity
section. -
In the
.affinity.nodeAffinity.nodeSelectorTerms
section wherekey
has the value"kubernetes-io/arch"
, specify either"amd64"
or"arm64"
forvalues
.
amd64
nodes, do the following:# An example affinity definition; this pod will only be assigned to a node
# running on amd64 (the default)
#
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "kubernetes.io/arch"
operator: In
values: ["amd64"]
...
-
"amd64"
: Use this for TimesTen Operators that you want to run onamd64
nodes. -
"arm64"
: Use this for TimesTen Operators that you want to run onarm64
nodes.