interface PodPropertiesProperty
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Batch.CfnJobDefinition.PodPropertiesProperty |
![]() | software.amazon.awscdk.services.batch.CfnJobDefinition.PodPropertiesProperty |
![]() | aws_cdk.aws_batch.CfnJobDefinition.PodPropertiesProperty |
![]() | @aws-cdk/aws-batch » CfnJobDefinition » PodPropertiesProperty |
The properties for the pod.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as batch from '@aws-cdk/aws-batch';
declare const labels: any;
declare const limits: any;
declare const requests: any;
const podPropertiesProperty: batch.CfnJobDefinition.PodPropertiesProperty = {
containers: [{
image: 'image',
// the properties below are optional
args: ['args'],
command: ['command'],
env: [{
name: 'name',
// the properties below are optional
value: 'value',
}],
imagePullPolicy: 'imagePullPolicy',
name: 'name',
resources: {
limits: limits,
requests: requests,
},
securityContext: {
privileged: false,
readOnlyRootFilesystem: false,
runAsGroup: 123,
runAsNonRoot: false,
runAsUser: 123,
},
volumeMounts: [{
mountPath: 'mountPath',
name: 'name',
readOnly: false,
}],
}],
dnsPolicy: 'dnsPolicy',
hostNetwork: false,
metadata: {
labels: labels,
},
serviceAccountName: 'serviceAccountName',
volumes: [{
name: 'name',
// the properties below are optional
emptyDir: {
medium: 'medium',
sizeLimit: 'sizeLimit',
},
hostPath: {
path: 'path',
},
secret: {
secretName: 'secretName',
// the properties below are optional
optional: false,
},
}],
};
Properties
Name | Type | Description |
---|---|---|
containers? | IResolvable | IResolvable | Eks [] | The properties of the container that's used on the Amazon EKS pod. |
dns | string | The DNS policy for the pod. |
host | boolean | IResolvable | Indicates if the pod uses the hosts' network IP address. |
metadata? | IResolvable | Metadata | CfnJobDefinition.PodPropertiesProperty.Metadata . |
service | string | The name of the service account that's used to run the pod. |
volumes? | IResolvable | IResolvable | Eks [] | Specifies the volumes for a job definition that uses Amazon EKS resources. |
containers?
Type:
IResolvable
|
IResolvable
|
Eks
[]
(optional)
The properties of the container that's used on the Amazon EKS pod.
dnsPolicy?
Type:
string
(optional)
The DNS policy for the pod.
The default value is ClusterFirst
. If the hostNetwork
parameter is not specified, the default is ClusterFirstWithHostNet
. 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 for dnsPolicy
in the RegisterJobDefinition API operation, then no value will be returned for dnsPolicy
by either of DescribeJobDefinitions or DescribeJobs API operations. The pod spec setting will contain either ClusterFirst
or ClusterFirstWithHostNet
, depending on the value of the hostNetwork
parameter. For more information, see Pod's DNS policy in the Kubernetes documentation .
Valid values: Default
| ClusterFirst
| ClusterFirstWithHostNet
hostNetwork?
Type:
boolean |
IResolvable
(optional)
Indicates if the pod uses the hosts' network IP address.
The default value is true
. Setting this to false
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 namespaces and Pod networking in the Kubernetes documentation .
metadata?
Type:
IResolvable
|
Metadata
(optional)
CfnJobDefinition.PodPropertiesProperty.Metadata
.
serviceAccountName?
Type:
string
(optional)
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 .
volumes?
Type:
IResolvable
|
IResolvable
|
Eks
[]
(optional)
Specifies the volumes for a job definition that uses Amazon EKS resources.