@aws-cdk_aws-batch-alpha.IEksContainerDefinition

interface IEksContainerDefinition ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Batch.Alpha.IEksContainerDefinition
Gogithub.com/aws/aws-cdk-go/awscdkbatchalpha/v2#IEksContainerDefinition
Javasoftware.amazon.awscdk.services.batch.alpha.IEksContainerDefinition
Pythonaws_cdk.aws_batch_alpha.IEksContainerDefinition
TypeScript (source)@aws-cdk/aws-batch-alpha ยป IEksContainerDefinition

Implemented by EksContainerDefinition

A container that can be run with EKS orchestration on EC2 resources.

Properties

NameTypeDescription
image๐Ÿ”นContainerImageThe image that this container will run.
node๐Ÿ”นNodeThe tree node.
volumes๐Ÿ”นEksVolume[]The Volumes to mount to this container.
args?๐Ÿ”นstring[]An array of arguments to the entrypoint.
command?๐Ÿ”นstring[]The entrypoint for the container.
cpuLimit?๐Ÿ”นnumberThe hard limit of CPUs to present to this container. Must be an even multiple of 0.25.
cpuReservation?๐Ÿ”นnumberThe soft limit of CPUs to reserve for the container Must be an even multiple of 0.25.
env?๐Ÿ”น{ [string]: string }The environment variables to pass to this container.
gpuLimit?๐Ÿ”นnumberThe hard limit of GPUs to present to this container.
gpuReservation?๐Ÿ”นnumberThe soft limit of CPUs to reserve for the container Must be an even multiple of 0.25.
imagePullPolicy?๐Ÿ”นImagePullPolicyThe image pull policy for this container.
memoryLimit?๐Ÿ”นSizeThe amount (in MiB) of memory to present to the container.
memoryReservation?๐Ÿ”นSizeThe soft limit (in MiB) of memory to reserve for the container.
name?๐Ÿ”นstringThe name of this container.
privileged?๐Ÿ”นbooleanIf specified, gives this container elevated permissions on the host container instance.
readonlyRootFilesystem?๐Ÿ”นbooleanIf specified, gives this container readonly access to its root file system.
runAsGroup?๐Ÿ”นnumberIf specified, the container is run as the specified group ID (gid).
runAsRoot?๐Ÿ”นbooleanIf specified, the container is run as a user with a uid other than 0.
runAsUser?๐Ÿ”นnumberIf specified, this container is run as the specified user ID (uid).

image๐Ÿ”น

Type: ContainerImage

The image that this container will run.


node๐Ÿ”น

Type: Node

The tree node.


volumes๐Ÿ”น

Type: EksVolume[]

The Volumes to mount to this container.

Automatically added to the Pod.

See also: https://kubernetes.io/docs/concepts/storage/volumes/


args?๐Ÿ”น

Type: string[] (optional)

An array of arguments to the entrypoint.

If this isn't specified, the CMD of the container image is used. This corresponds to the args member in the Entrypoint portion of the Pod in Kubernetes. Environment variable references are expanded using the container's environment. If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if the reference is to "$(NAME1)" and the NAME1 environment variable doesn't exist, the command string will remain "$(NAME1)." $$ is replaced with $, and the resulting string isn't expanded. or example, $$(VAR_NAME) is passed as $(VAR_NAME) whether or not the VAR_NAME environment variable exists.

See also: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/


command?๐Ÿ”น

Type: string[] (optional)

The entrypoint for the container.

This isn't run within a shell. If this isn't specified, the ENTRYPOINT of the container image is used. Environment variable references are expanded using the container's environment. If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if the reference is to "$(NAME1)" and the NAME1 environment variable doesn't exist, the command string will remain "$(NAME1)." $$ is replaced with $ and the resulting string isn't expanded. For example, $$(VAR_NAME) will be passed as $(VAR_NAME) whether or not the VAR_NAME environment variable exists.

The entrypoint can't be updated.

See also: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#entrypoint


cpuLimit?๐Ÿ”น

Type: number (optional, default: No CPU limit)

The hard limit of CPUs to present to this container. Must be an even multiple of 0.25.

If your container attempts to exceed this limit, it will be terminated.

At least one of cpuReservation and cpuLimit is required. If both are specified, then cpuLimit must be at least as large as cpuReservation.

See also: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/


cpuReservation?๐Ÿ”น

Type: number (optional, default: No CPUs reserved)

The soft limit of CPUs to reserve for the container Must be an even multiple of 0.25.

The container will given at least this many CPUs, but may consume more.

At least one of cpuReservation and cpuLimit is required. If both are specified, then cpuLimit must be at least as large as cpuReservation.

See also: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/


env?๐Ÿ”น

Type: { [string]: string } (optional)

The environment variables to pass to this container.

Note: Environment variables cannot start with "AWS_BATCH". This naming convention is reserved for variables that AWS Batch sets.


gpuLimit?๐Ÿ”น

Type: number (optional, default: No GPU limit)

The hard limit of GPUs to present to this container.

If your container attempts to exceed this limit, it will be terminated.

If both gpuReservation and gpuLimit are specified, then gpuLimit must be equal to gpuReservation.

See also: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/


gpuReservation?๐Ÿ”น

Type: number (optional, default: No GPUs reserved)

The soft limit of CPUs to reserve for the container Must be an even multiple of 0.25.

The container will given at least this many CPUs, but may consume more.

If both gpuReservation and gpuLimit are specified, then gpuLimit must be equal to gpuReservation.

See also: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/


imagePullPolicy?๐Ÿ”น

Type: ImagePullPolicy (optional, default: ALWAYS if the :latest tag is specified, IF_NOT_PRESENT otherwise)

The image pull policy for this container.

See also: https://kubernetes.io/docs/concepts/containers/images/#updating-images


memoryLimit?๐Ÿ”น

Type: Size (optional, default: No memory limit)

The amount (in MiB) of memory to present to the container.

If your container attempts to exceed the allocated memory, it will be terminated.

Must be larger that 4 MiB

At least one of memoryLimit and memoryReservation is required

Note: To maximize your resource utilization, provide your jobs with as much memory as possible for the specific instance type that you are using.

See also: https://docs.aws.amazon.com/batch/latest/userguide/memory-management.html


memoryReservation?๐Ÿ”น

Type: Size (optional, default: No memory reserved)

The soft limit (in MiB) of memory to reserve for the container.

Your container will be given at least this much memory, but may consume more.

Must be larger that 4 MiB

When system memory is under heavy contention, Docker attempts to keep the container memory to this soft limit. However, your container can consume more memory when it needs to, up to either the hard limit specified with the memory parameter (if applicable), or all of the available memory on the container instance, whichever comes first.

At least one of memoryLimit and memoryReservation is required. If both are specified, then memoryLimit must be equal to memoryReservation

Note: To maximize your resource utilization, provide your jobs with as much memory as possible for the specific instance type that you are using.

See also: https://docs.aws.amazon.com/batch/latest/userguide/memory-management.html


name?๐Ÿ”น

Type: string (optional, default: : 'Default')

The name of this container.


privileged?๐Ÿ”น

Type: boolean (optional, default: false)

If specified, gives this container elevated permissions on the host container instance.

The level of permissions are similar to the root user permissions.

This parameter maps to privileged policy in the Privileged pod security policies in the Kubernetes documentation.

Note: this is only compatible with Kubernetes < v1.25

See also: https://kubernetes.io/docs/concepts/security/pod-security-policy/#volumes-and-file-systems


readonlyRootFilesystem?๐Ÿ”น

Type: boolean (optional, default: false)

If specified, gives this container readonly access to its root file system.

This parameter maps to ReadOnlyRootFilesystem policy in the Volumes and file systems pod security policies in the Kubernetes documentation.

Note: this is only compatible with Kubernetes < v1.25

See also: https://kubernetes.io/docs/concepts/security/pod-security-policy/#volumes-and-file-systems


runAsGroup?๐Ÿ”น

Type: number (optional, default: none)

If specified, the container is run as the specified group ID (gid).

If this parameter isn't specified, the default is the group that's specified in the image metadata. This parameter maps to RunAsGroup and MustRunAs policy in the Users and groups pod security policies in the Kubernetes documentation.

Note: this is only compatible with Kubernetes < v1.25

See also: https://kubernetes.io/docs/concepts/security/pod-security-policy/#users-and-groups


runAsRoot?๐Ÿ”น

Type: boolean (optional, default: the container is not required to run as a non-root user)

If specified, the container is run as a user with a uid other than 0.

Otherwise, no such rule is enforced. This parameter maps to RunAsUser and MustRunAsNonRoot policy in the Users and groups pod security policies in the Kubernetes documentation.

Note: this is only compatible with Kubernetes < v1.25

See also: https://kubernetes.io/docs/concepts/security/pod-security-policy/#users-and-groups


runAsUser?๐Ÿ”น

Type: number (optional, default: the user that is specified in the image metadata.)

If specified, this container is run as the specified user ID (uid).

This parameter maps to RunAsUser and MustRunAs policy in the Users and groups pod security policies in the Kubernetes documentation.

Note: this is only compatible with Kubernetes < v1.25

See also: https://kubernetes.io/docs/concepts/security/pod-security-policy/#users-and-groups

Methods

NameDescription
addVolume(volume)๐Ÿ”นMount a Volume to this container.

addVolume(volume)๐Ÿ”น

public addVolume(volume: EksVolume): void

Parameters

  • volume EksVolume

Mount a Volume to this container.

Automatically added to the Pod.