Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This section will guide you through the process of submitting jobs to the EKS Cluster by modifying the workload POD configuration files. 

Pre-Submission Requirements:

Submitting a Single Job

Step 1: Modifying the Workload Pod YAML File

To ensure that your workload runs on Exostellar nodes scheduled by the Exostellar Karpenter and block Karpenter from voluntarily disrupt disrupting your workload, you need to set affinity settings and annotations in your workload YAML file. Below is an example of how to modify your YAML file to include these settings:

Code Block
languageyaml
apiVersion: v1
kind: Pod
metadata:
  name: my-nginx
  annotations:
    karpenter.sh/do-not-disrupt: "true"
spec:
 affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: karpenter.sh/nodepool
            operator: In
            values:
              - pool-a
  containers:
  - name: nginx
    image: nginx:1.14.2
    ports:
    - containerPort: 80
    resources:
      requests:
        cpu: "1"

Step 2: Adding Node Labels in Exostellar Karpenter NodePool (optional)

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 autoscaling process. To ensure that Exostellar Karpenter provisions nodes with the appropriate labels, you need to update the NodePool configuration with the help the following command: 

Code Block
kubectl edit nodepool pool-a

An example NodePool configuration shown below creates nodes that has jobtype of batch and node family nodeFamily of c5:

Code Block
languageyaml
apiVersion: karpenter.sh/v1beta1
kind: NodePool
metadata:

 creationTimestamp: "2024-06-02T20:06:58Z"
  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: {}

Step 3: Submitting the

...

Job

After modifying the workload pod YAML file, submit the job to the EKS Cluster just like you would run a regular pod:

Code Block
kubectl apply -f workloadmy-podnginx.yaml

...

Post-Submission Results

Exostellar Karpenter will automatically bring up the node that is suitable for your request, to check the new node that has been added:

Code Block
kubectl get nodes pods

 To view the scheduling events and further details for the workload POD:

Code Block
kubectl describe pod my-workload-pod

To check the logs for the workload POD:

Code Block
kubectl logs my-workload-pod-A

The created node has x-compute as part of the name.

Code Block
languagebash
NAME                                            STATUS   ROLES    AGE   VERSION
ip-192-0-128-xxx.us-east-2.x-compute.internal   Ready    <none>   40s   v1.29.3-eks-ae9a62a