# DnsPolicy

The DNS Policy for the pod used by the Job Definition.

- Source: [`aws-batch/lib/eks-job-definition.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-batch/lib/eks-job-definition.ts#L106)
- Type last changed: v2.96.0 · 13 Sep 2023

## Members

| Member | Description |
| --- | --- |
| `DEFAULT` | The Pod inherits the name resolution configuration from the node that the Pods run on. |
| `CLUSTER_FIRST` | Any DNS query that does not match the configured cluster domain suffix, such as `"www.kubernetes.io"`, is forwarded to an upstream nameserver by the DNS server. Cluster administrators may have extra stub-domain and upstream DNS servers configured. |
| `CLUSTER_FIRST_WITH_HOST_NET` | For Pods running with `hostNetwork`, you should explicitly set its DNS policy to `CLUSTER_FIRST_WITH_HOST_NET`. |

## Referenced by

- [`EksJobDefinition`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_batch.EksJobDefinition.html).dnsPolicy
- [`EksJobDefinitionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_batch.EksJobDefinitionProps.html).dnsPolicy
- [`IEksJobDefinition`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_batch.IEksJobDefinition.html).dnsPolicy
