AWS::Batch::JobDefinition PodProperties
The properties for the pod.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Containers" :
[ EksContainer, ... ]
, "DnsPolicy" :String
, "HostNetwork" :Boolean
, "ServiceAccountName" :String
, "Volumes" :[ EksVolume, ... ]
}
YAML
Containers:
- EksContainer
DnsPolicy:String
HostNetwork:Boolean
ServiceAccountName:String
Volumes:- EksVolume
Properties
Containers
-
The properties of the container that's used on the Amazon EKS pod.
Required: No
Type: List of EksContainer
Update requires: No interruption
DnsPolicy
-
The DNS policy for the pod. The default value is
ClusterFirst
. If thehostNetwork
parameter is not specified, the default isClusterFirstWithHostNet
.ClusterFirst
indicates that any DNS query that does not match the configured cluster domain suffix is forwarded to the upstream nameserver inherited from the node. If no value was specified fordnsPolicy
in the RegisterJobDefinition API operation, then no value will be returned fordnsPolicy
by either of DescribeJobDefinitions or DescribeJobs API operations. The pod spec setting will contain eitherClusterFirst
orClusterFirstWithHostNet
, depending on the value of thehostNetwork
parameter. For more information, see Pod's DNS policyin the Kubernetes documentation. Valid values:
Default
|ClusterFirst
|ClusterFirstWithHostNet
Required: No
Type: String
Update requires: No interruption
HostNetwork
-
Indicates if the pod uses the hosts' network IP address. The default value is
true
. Setting this tofalse
enables the Kubernetes pod networking model. Most AWS Batch workloads are egress-only and don't require the overhead of IP allocation for each pod for incoming connections. For more information, see Host namespacesand Pod networking in the Kubernetes documentation. Required: No
Type: Boolean
Update requires: No interruption
ServiceAccountName
-
The name of the service account that's used to run the pod. For more information, see Kubernetes service accounts and Configure a Kubernetes service account to assume an IAM role in the Amazon EKS User Guide and Configure service accounts for pods
in the Kubernetes documentation. Required: No
Type: String
Update requires: No interruption
Volumes
-
Specifies the volumes for a job definition that uses Amazon EKS resources.
Required: No
Update requires: No interruption