Amazon EKS jobs
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 parameter
defines the set of parameters that an Amazon Batch on Amazon EKS job supports. In a SubmitJob request, the eksPropertiesOverride 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
anddnsPolicy=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.
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:
KubernetesSecrets
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 in the
Amazon EKS User Guide.