# Configure Host Aliases and Pod DNS

Configure `hostAliases` and `dnsConfig` in the Master Aggregator (MA), child aggregator, and leaf node specifications of the `sdb-cluster.yaml` file. Both fields are optional.

Use these fields to configure static hostname mappings or additional DNS settings for the Kubernetes pods that run the SingleStore engine.

## Configure Host Aliases

The `hostAliases` field adds static hostname mappings to `/etc/hosts` in the Kubernetes pod that runs the corresponding SingleStore engine node. Each entry specifies an IP address and one or more hostnames.

```yaml
spec:
  masterAggregatorSpec:
    hostAliases:
      - ip: 10.1.2.3
        hostnames:
          - broker-1.internal
          - broker-2.internal
```

## Configure Pod DNS

The `dnsConfig` field configures DNS settings for the Kubernetes pods that run the corresponding type of SingleStore engine node. Supported subfields are `nameservers`, `searches`, and `options`.

```yaml
spec:
  leafSpec:
    dnsConfig:
      nameservers:
        - 1.1.1.1
      searches:
        - corp.example
      options:
        - name: ndots
          value: "2"
```

For Kubernetes pods running SingleStore engine nodes, the Operator sets the DNS policy to `ClusterFirst`. You cannot override `dnsPolicy` in the `MemsqlCluster` custom resource. The Operator applies only the settings specified in `dnsConfig`; if you omit `dnsConfig`, it leaves the pod’s DNS configuration unchanged.

## Configure Fields for Each Node Type

Configure `hostAliases` and `dnsConfig` under the corresponding node specification: `masterAggregatorSpec`, `childAggregatorSpec`, or `leafSpec`. Refer to [Pod Scheduling](https://docs.singlestore.com/db/v9.1/reference/singlestore-operator-reference/pod-scheduling.md) for more information about scheduling attributes. For example:

```yaml
apiVersion: memsql.com/v1alpha1
kind: MemsqlCluster
metadata:
  name: sdb-cluster
spec:
  masterAggregatorSpec:
    hostAliases:
      - ip: 10.1.2.3
        hostnames:
          - broker-1.internal
  childAggregatorSpec:
    dnsConfig:
      searches:
        - aggregator.corp.example
  leafSpec:
    hostAliases:
      - ip: 10.1.2.4
        hostnames:
          - broker-2.internal
    dnsConfig:
      searches:
        - leaf.corp.example
```

Apply the updated object definition file:

```shell
kubectl apply -f sdb-cluster.yaml
```

***

Modified at: October 15, 2026

Source: [/db/v9.1/reference/singlestore-operator-reference/configure-host-aliases-and-pod-dns/](https://docs.singlestore.com/db/v9.1/reference/singlestore-operator-reference/configure-host-aliases-and-pod-dns/)

(An index of the documentation is available at /llms.txt)
