...
If your workload requires scheduling on nodes with specific labels, it is required to configure Exostellar Karpenter NodePool so nodes are created with needed labels in the autoscaling process. To ensure that Exostellar Karpenter provisions nodes with the appropriate labels, you need to update the NodePool configuration with the following command:
Code Block |
---|
kubectl edit nodepoolexonodepool pool-a |
An example NodePool configuration shown below creates nodes that has jobtype
of batch
and nodeFamily
of c5
:
Code Block | ||
---|---|---|
| ||
apiVersion: karpenter.sh/v1beta1 kind: NodePoolExoNodePool metadata: name: pool-a spec: limits: cpu: "400" template: metadata: labels: jobtype: batch nodeFamily: c5 spec: nodeClassRef: name: pool-a requirements: - key: topology.kubernetes.io/zone operator: In values: - us-east-1a resources: {} status: {} |
...
Code Block | ||
---|---|---|
| ||
apiVersion: apps/v1 kind: Deployment metadata: name: my-nginx annotations: karpenter.sh/do-not-disrupt: "true" spec: replicas: 100 selector: matchLabels: app: my-nginx template: metadata: labels: app: my-nginx spec: tolerations: - key: "exokarpenter.sh/x-compute" operator: "Exists" effect: "NoSchedule" affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: karpenterexokarpenter.sh/nodepool operator: In values: - pool-a containers: - name: nginx image: nginx:1.14.2 ports: - containerPort: 80 resources: requests: cpu: 1 |
...