

# Amazon EKS jobs
<a name="eks-jobs"></a>

A job is the smallest unit of work in Amazon Batch. An Amazon Batch job on Amazon EKS has a one-to-one mapping to a Kubernetes pod. An Amazon Batch job definition is a template for an Amazon Batch job. When you submit an Amazon Batch job, you reference a job definition, target a job queue, and provide a name for a job. In the job definition of an Amazon Batch job on Amazon EKS, the [eksProperties](https://docs.amazonaws.cn/batch/latest/APIReference/API_EksProperties.html) parameter defines the set of parameters that an Amazon Batch on Amazon EKS job supports. In a [SubmitJob](https://docs.amazonaws.cn/batch/latest/APIReference/API_SubmitJob.html) request, the [eksPropertiesOverride](https://docs.amazonaws.cn/batch/latest/APIReference/API_EksPropertiesOverride.html) parameter allows for overrides to some common parameters. This way, you can use templates of job definitions for multiple jobs. When a job is dispatched to your Amazon EKS cluster, Amazon Batch transforms the job into a `podspec` (`Kind: Pod`). The `podspec` uses some additional Amazon Batch parameters to ensure that jobs are scaled and scheduled correctly. Amazon Batch combines labels and taints to ensure jobs run only on Amazon Batch managed nodes and that other pods don't run on those nodes.

**Important**  
If the `hostNetwork` parameter isn't explicitly set in an Amazon EKS job definition, the pod networking mode in Amazon Batch defaults to host mode. More specifically, the following settings are applied: `hostNetwork=true` and `dnsPolicy=ClusterFirstWithHostNet`.
Amazon Batch cleans up job pods soon after a pod completes its job. To see pod application logs, configure a logging service for your cluster. For more information, see [Use CloudWatch Logs to monitor Amazon Batch on Amazon EKS jobs](batch-eks-cloudwatch-logs.md).

**Topics**
+ [Tutorial: Map a running job to a pod and a node](eks-jobs-map-running-job.md)
+ [Tutorial: Map a running pod back to its job](eks-jobs-map-running-pod-to-job.md)

**Features that Amazon Batch Amazon EKS jobs support**

These are the Amazon Batch specific features that are also common to Kubernetes jobs that run on Amazon EKS:
+ [Job dependencies](job_dependencies.md)
+ [Array jobs](array_jobs.md)
+ [Job timeouts](job_timeouts.md)
+ [Automated job retries](job_retries.md)
+ [Use fair-share scheduling to help schedule jobs](fair-share-scheduling.md)

**Kubernetes `Secrets` and `ServiceAccounts`**  
Amazon Batch supports referencing Kubernetes `Secrets` and `ServiceAccounts`. You can configure pods to use Amazon EKS IAM roles for service accounts. For more information, see [Configuring pods to use a Kubernetes service account](https://docs.amazonaws.cn/eks/latest/userguide/pod-configuration.html) in the [https://docs.amazonaws.cn/eks/latest/userguide/](https://docs.amazonaws.cn/eks/latest/userguide/).

**Related documents**
+ [Memory and vCPU considerations for Amazon Batch on Amazon EKS](memory-cpu-batch-eks.md)
+ [Run GPU jobs](gpu-jobs.md)
+ [Jobs stuck in a `RUNNABLE` status](job_stuck_in_runnable.md)