-1

I found one post that suggested I use

HostNetwork: true

in the spec: section on my bind9-deployment.yaml file but I'm not sure whether it goes in the spec: under

kind: Service

or

kind: Deployment 

section of my file.

I am hoping eventually to make my on-prem bind9 service available to my local network.

mr.zog
  • 533
  • 1
  • 7
  • 26

1 Answers1

0

See here for more info about DNS policy when using hostNetwork.

version: v1
kind: Deployment
metadata:
  name: nginx
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      hostNetwork: true
      dnsPolicy: ClusterFirstWithHostNet
      container:
      - name: nginx
        image: nginx
        ports:
        - containerPort: 80
gohm'c
  • 13,492
  • 1
  • 9
  • 16
  • Thanks for this, gohm'c. Now I need to figure out how to get these pods "behind" a single, static IP. – mr.zog Jan 09 '23 at 01:46