--- apiVersion: v1 items: - apiVersion: v1 kind: Pod metadata: annotations: cluster-autoscaler.kubernetes.io/enable-ds-eviction: "true" k8s.ovn.org/pod-networks: '{"default":{"ip_addresses":["10.128.0.32/23"],"mac_address":"0a:58:0a:80:00:20","gateway_ips":["10.128.0.1"],"routes":[{"dest":"10.128.0.0/16","nextHop":"10.128.0.1"},{"dest":"172.30.0.0/16","nextHop":"10.128.0.1"},{"dest":"169.254.0.5/32","nextHop":"10.128.0.1"},{"dest":"100.64.0.0/16","nextHop":"10.128.0.1"}],"ip_address":"10.128.0.32/23","gateway_ip":"10.128.0.1","role":"primary"}}' k8s.v1.cni.cncf.io/network-status: |- [{ "name": "ovn-kubernetes", "interface": "eth0", "ips": [ "10.128.0.32" ], "mac": "0a:58:0a:80:00:20", "default": true, "dns": {} }] creationTimestamp: "2026-02-16T17:00:47Z" generateName: dns-default- labels: controller-revision-hash: 549968cb59 dns.operator.openshift.io/daemonset-dns: default pod-template-generation: "1" managedFields: - apiVersion: v1 fieldsType: FieldsV1 fieldsV1: f:metadata: f:annotations: .: {} f:cluster-autoscaler.kubernetes.io/enable-ds-eviction: {} f:target.workload.openshift.io/management: {} f:generateName: {} f:labels: .: {} f:controller-revision-hash: {} f:dns.operator.openshift.io/daemonset-dns: {} f:pod-template-generation: {} f:ownerReferences: .: {} k:{"uid":"5743d163-cf0b-4595-a823-5abd7e63b58b"}: {} f:spec: f:affinity: .: {} f:nodeAffinity: .: {} f:requiredDuringSchedulingIgnoredDuringExecution: {} f:containers: k:{"name":"dns"}: .: {} f:args: {} f:command: {} f:image: {} f:imagePullPolicy: {} f:livenessProbe: .: {} f:failureThreshold: {} f:httpGet: .: {} f:path: {} f:port: {} f:scheme: {} f:initialDelaySeconds: {} f:periodSeconds: {} f:successThreshold: {} f:timeoutSeconds: {} f:name: {} f:ports: .: {} k:{"containerPort":5353,"protocol":"TCP"}: .: {} f:containerPort: {} f:name: {} f:protocol: {} k:{"containerPort":5353,"protocol":"UDP"}: .: {} f:containerPort: {} f:name: {} f:protocol: {} f:readinessProbe: .: {} f:failureThreshold: {} f:httpGet: .: {} f:path: {} f:port: {} f:scheme: {} f:initialDelaySeconds: {} f:periodSeconds: {} f:successThreshold: {} f:timeoutSeconds: {} f:resources: .: {} f:requests: .: {} f:cpu: {} f:memory: {} f:terminationMessagePath: {} f:terminationMessagePolicy: {} f:volumeMounts: .: {} k:{"mountPath":"/etc/coredns"}: .: {} f:mountPath: {} f:name: {} f:readOnly: {} k:{"name":"kube-rbac-proxy"}: .: {} f:args: {} f:image: {} f:imagePullPolicy: {} f:name: {} f:ports: .: {} k:{"containerPort":9154,"protocol":"TCP"}: .: {} f:containerPort: {} f:name: {} f:protocol: {} f:resources: .: {} f:requests: .: {} f:cpu: {} f:memory: {} f:terminationMessagePath: {} f:terminationMessagePolicy: {} f:volumeMounts: .: {} k:{"mountPath":"/etc/tls/private"}: .: {} f:mountPath: {} f:name: {} f:readOnly: {} f:dnsPolicy: {} f:enableServiceLinks: {} f:nodeSelector: {} f:priorityClassName: {} f:restartPolicy: {} f:schedulerName: {} f:securityContext: {} f:serviceAccount: {} f:serviceAccountName: {} f:terminationGracePeriodSeconds: {} f:tolerations: {} f:volumes: .: {} k:{"name":"config-volume"}: .: {} f:configMap: .: {} f:defaultMode: {} f:items: {} f:name: {} f:name: {} k:{"name":"metrics-tls"}: .: {} f:name: {} f:secret: .: {} f:defaultMode: {} f:secretName: {} manager: kube-controller-manager operation: Update time: "2026-02-16T17:00:47Z" - apiVersion: v1 fieldsType: FieldsV1 fieldsV1: f:metadata: f:annotations: f:k8s.ovn.org/pod-networks: {} manager: master-0 operation: Update subresource: status time: "2026-02-16T17:00:47Z" - apiVersion: v1 fieldsType: FieldsV1 fieldsV1: f:metadata: f:annotations: f:k8s.v1.cni.cncf.io/network-status: {} manager: multus-daemon operation: Update subresource: status time: "2026-02-16T17:24:36Z" - apiVersion: v1 fieldsType: FieldsV1 fieldsV1: f:status: f:conditions: k:{"type":"ContainersReady"}: .: {} f:lastProbeTime: {} f:lastTransitionTime: {} f:status: {} f:type: {} k:{"type":"Initialized"}: .: {} f:lastProbeTime: {} f:lastTransitionTime: {} f:status: {} f:type: {} k:{"type":"PodReadyToStartContainers"}: .: {} f:lastProbeTime: {} f:lastTransitionTime: {} f:status: {} f:type: {} k:{"type":"Ready"}: .: {} f:lastProbeTime: {} f:lastTransitionTime: {} f:status: {} f:type: {} f:containerStatuses: {} f:hostIP: {} f:hostIPs: {} f:phase: {} f:podIP: {} f:podIPs: .: {} k:{"ip":"10.128.0.32"}: .: {} f:ip: {} f:startTime: {} manager: kubelet operation: Update subresource: status time: "2026-02-16T17:24:50Z" name: dns-default-qcgxx namespace: openshift-dns ownerReferences: - apiVersion: apps/v1 blockOwnerDeletion: true controller: true kind: DaemonSet name: dns-default uid: 5743d163-cf0b-4595-a823-5abd7e63b58b resourceVersion: "21313" uid: 2d96ccdc-0b09-437d-bfca-1958af5d9953 spec: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchFields: - key: metadata.name operator: In values: - master-0 containers: - args: - -conf - /etc/coredns/Corefile command: - coredns image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:8ea13b0cbfe9be0d3d7ea80d50e512af6a453921a553c7c79b566530142b611b imagePullPolicy: IfNotPresent livenessProbe: failureThreshold: 5 httpGet: path: /health port: 8080 scheme: HTTP initialDelaySeconds: 60 periodSeconds: 10 successThreshold: 1 timeoutSeconds: 5 name: dns ports: - containerPort: 5353 name: dns protocol: UDP - containerPort: 5353 name: dns-tcp protocol: TCP readinessProbe: failureThreshold: 3 httpGet: path: /ready port: 8181 scheme: HTTP initialDelaySeconds: 10 periodSeconds: 3 successThreshold: 1 timeoutSeconds: 3 resources: requests: cpu: 50m memory: 70Mi terminationMessagePath: /dev/termination-log terminationMessagePolicy: FallbackToLogsOnError volumeMounts: - mountPath: /etc/coredns name: config-volume readOnly: true - mountPath: /var/run/secrets/kubernetes.io/serviceaccount name: kube-api-access-zl5w2 readOnly: true - args: - --logtostderr - --secure-listen-address=:9154 - --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 - --upstream=http://127.0.0.1:9153/ - --tls-cert-file=/etc/tls/private/tls.crt - --tls-private-key-file=/etc/tls/private/tls.key image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:93bf1697031cce06c4e576aa1ba5d8bda7e91b918627ed1d61f8c89a95a111f0 imagePullPolicy: IfNotPresent name: kube-rbac-proxy ports: - containerPort: 9154 name: metrics protocol: TCP resources: requests: cpu: 10m memory: 40Mi terminationMessagePath: /dev/termination-log terminationMessagePolicy: FallbackToLogsOnError volumeMounts: - mountPath: /etc/tls/private name: metrics-tls readOnly: true - mountPath: /var/run/secrets/kubernetes.io/serviceaccount name: kube-api-access-zl5w2 readOnly: true dnsPolicy: Default enableServiceLinks: true nodeName: master-0 nodeSelector: kubernetes.io/os: linux preemptionPolicy: PreemptLowerPriority priority: 2000001000 priorityClassName: system-node-critical restartPolicy: Always schedulerName: default-scheduler securityContext: {} serviceAccount: dns serviceAccountName: dns terminationGracePeriodSeconds: 30 tolerations: - key: node-role.kubernetes.io/master operator: Exists - effect: NoExecute key: node.kubernetes.io/not-ready operator: Exists - effect: NoExecute key: node.kubernetes.io/unreachable operator: Exists - effect: NoSchedule key: node.kubernetes.io/disk-pressure operator: Exists - effect: NoSchedule key: node.kubernetes.io/memory-pressure operator: Exists - effect: NoSchedule key: node.kubernetes.io/pid-pressure operator: Exists - effect: NoSchedule key: node.kubernetes.io/unschedulable operator: Exists volumes: - configMap: defaultMode: 420 items: - key: Corefile path: Corefile name: dns-default name: config-volume - name: metrics-tls secret: defaultMode: 420 secretName: dns-default-metrics-tls - name: kube-api-access-zl5w2 projected: defaultMode: 420 sources: - serviceAccountToken: expirationSeconds: 3607 path: token - configMap: items: - key: ca.crt path: ca.crt name: kube-root-ca.crt - downwardAPI: items: - fieldRef: apiVersion: v1 fieldPath: metadata.namespace path: namespace - configMap: items: - key: service-ca.crt path: service-ca.crt name: openshift-service-ca.crt status: conditions: - lastProbeTime: null lastTransitionTime: "2026-02-16T17:24:39Z" status: "True" type: PodReadyToStartContainers - lastProbeTime: null lastTransitionTime: "2026-02-16T17:00:47Z" status: "True" type: Initialized - lastProbeTime: null lastTransitionTime: "2026-02-16T17:24:50Z" status: "True" type: Ready - lastProbeTime: null lastTransitionTime: "2026-02-16T17:24:50Z" status: "True" type: ContainersReady - lastProbeTime: null lastTransitionTime: "2026-02-16T17:00:47Z" status: "True" type: PodScheduled containerStatuses: - containerID: cri-o://ff64f5042172e9dffa5614904d748d2db158b783ee3c06a687a94581dc6e2736 image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:8ea13b0cbfe9be0d3d7ea80d50e512af6a453921a553c7c79b566530142b611b imageID: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:8ea13b0cbfe9be0d3d7ea80d50e512af6a453921a553c7c79b566530142b611b lastState: {} name: dns ready: true restartCount: 2 started: true state: running: startedAt: "2026-02-16T17:24:38Z" volumeMounts: - mountPath: /etc/coredns name: config-volume readOnly: true recursiveReadOnly: Disabled - mountPath: /var/run/secrets/kubernetes.io/serviceaccount name: kube-api-access-zl5w2 readOnly: true recursiveReadOnly: Disabled - containerID: cri-o://54bc3bbe17322a03654052d676ab4eacfcc2c1081769055c06085fd6ba2d4f36 image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:93bf1697031cce06c4e576aa1ba5d8bda7e91b918627ed1d61f8c89a95a111f0 imageID: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:93bf1697031cce06c4e576aa1ba5d8bda7e91b918627ed1d61f8c89a95a111f0 lastState: {} name: kube-rbac-proxy ready: true restartCount: 4 started: true state: running: startedAt: "2026-02-16T17:24:39Z" volumeMounts: - mountPath: /etc/tls/private name: metrics-tls readOnly: true recursiveReadOnly: Disabled - mountPath: /var/run/secrets/kubernetes.io/serviceaccount name: kube-api-access-zl5w2 readOnly: true recursiveReadOnly: Disabled hostIP: 192.168.32.10 hostIPs: - ip: 192.168.32.10 phase: Running podIP: 10.128.0.32 podIPs: - ip: 10.128.0.32 qosClass: Burstable startTime: "2026-02-16T17:00:47Z" - apiVersion: v1 kind: Pod metadata: creationTimestamp: "2026-02-16T17:00:47Z" generateName: node-resolver- labels: controller-revision-hash: 759d7d8788 dns.operator.openshift.io/daemonset-node-resolver: "" pod-template-generation: "1" managedFields: - apiVersion: v1 fieldsType: FieldsV1 fieldsV1: f:metadata: f:annotations: .: {} f:target.workload.openshift.io/management: {} f:generateName: {} f:labels: .: {} f:controller-revision-hash: {} f:dns.operator.openshift.io/daemonset-node-resolver: {} f:pod-template-generation: {} f:ownerReferences: .: {} k:{"uid":"d5a95fcc-2107-45b6-8a00-2a496b186a40"}: {} f:spec: f:affinity: .: {} f:nodeAffinity: .: {} f:requiredDuringSchedulingIgnoredDuringExecution: {} f:containers: k:{"name":"dns-node-resolver"}: .: {} f:command: {} f:env: .: {} k:{"name":"CLUSTER_DOMAIN"}: .: {} f:name: {} f:value: {} k:{"name":"NAMESERVER"}: .: {} f:name: {} f:value: {} k:{"name":"SERVICES"}: .: {} f:name: {} f:value: {} f:image: {} f:imagePullPolicy: {} f:name: {} f:resources: .: {} f:requests: .: {} f:cpu: {} f:memory: {} f:securityContext: .: {} f:privileged: {} f:terminationMessagePath: {} f:terminationMessagePolicy: {} f:volumeMounts: .: {} k:{"mountPath":"/etc/hosts"}: .: {} f:mountPath: {} f:name: {} f:dnsPolicy: {} f:enableServiceLinks: {} f:hostNetwork: {} f:nodeSelector: {} f:priorityClassName: {} f:restartPolicy: {} f:schedulerName: {} f:securityContext: {} f:serviceAccount: {} f:serviceAccountName: {} f:terminationGracePeriodSeconds: {} f:tolerations: {} f:volumes: .: {} k:{"name":"hosts-file"}: .: {} f:hostPath: .: {} f:path: {} f:type: {} f:name: {} manager: kube-controller-manager operation: Update time: "2026-02-16T17:00:47Z" - apiVersion: v1 fieldsType: FieldsV1 fieldsV1: f:status: f:conditions: k:{"type":"ContainersReady"}: .: {} f:lastProbeTime: {} f:lastTransitionTime: {} f:status: {} f:type: {} k:{"type":"Initialized"}: .: {} f:lastProbeTime: {} f:lastTransitionTime: {} f:status: {} f:type: {} k:{"type":"PodReadyToStartContainers"}: .: {} f:lastProbeTime: {} f:lastTransitionTime: {} f:status: {} f:type: {} k:{"type":"Ready"}: .: {} f:lastProbeTime: {} f:lastTransitionTime: {} f:status: {} f:type: {} f:containerStatuses: {} f:hostIP: {} f:hostIPs: {} f:phase: {} f:podIP: {} f:podIPs: .: {} k:{"ip":"192.168.32.10"}: .: {} f:ip: {} f:startTime: {} manager: kubelet operation: Update subresource: status time: "2026-02-16T17:24:23Z" name: node-resolver-vfxj4 namespace: openshift-dns ownerReferences: - apiVersion: apps/v1 blockOwnerDeletion: true controller: true kind: DaemonSet name: node-resolver uid: d5a95fcc-2107-45b6-8a00-2a496b186a40 resourceVersion: "20053" uid: a6fe41b0-1a42-4f07-8220-d9aaa50788ad spec: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchFields: - key: metadata.name operator: In values: - master-0 containers: - command: - /bin/bash - -c - | #!/bin/bash set -uo pipefail trap 'jobs -p | xargs kill || true; wait; exit 0' TERM OPENSHIFT_MARKER="openshift-generated-node-resolver" HOSTS_FILE="/etc/hosts" TEMP_FILE="/etc/hosts.tmp" IFS=', ' read -r -a services <<< "${SERVICES}" # Make a temporary file with the old hosts file's attributes. if ! cp -f --attributes-only "${HOSTS_FILE}" "${TEMP_FILE}"; then echo "Failed to preserve hosts file. Exiting." exit 1 fi while true; do declare -A svc_ips for svc in "${services[@]}"; do # Fetch service IP from cluster dns if present. We make several tries # to do it: IPv4, IPv6, IPv4 over TCP and IPv6 over TCP. The two last ones # are for deployments with Kuryr on older OpenStack (OSP13) - those do not # support UDP loadbalancers and require reaching DNS through TCP. cmds=('dig -t A @"${NAMESERVER}" +short "${svc}.${CLUSTER_DOMAIN}"|grep -v "^;"' 'dig -t AAAA @"${NAMESERVER}" +short "${svc}.${CLUSTER_DOMAIN}"|grep -v "^;"' 'dig -t A +tcp +retry=0 @"${NAMESERVER}" +short "${svc}.${CLUSTER_DOMAIN}"|grep -v "^;"' 'dig -t AAAA +tcp +retry=0 @"${NAMESERVER}" +short "${svc}.${CLUSTER_DOMAIN}"|grep -v "^;"') for i in ${!cmds[*]} do ips=($(eval "${cmds[i]}")) if [[ "$?" -eq 0 && "${#ips[@]}" -ne 0 ]]; then svc_ips["${svc}"]="${ips[@]}" break fi done done # Update /etc/hosts only if we get valid service IPs # We will not update /etc/hosts when there is coredns service outage or api unavailability # Stale entries could exist in /etc/hosts if the service is deleted if [[ -n "${svc_ips[*]-}" ]]; then # Build a new hosts file from /etc/hosts with our custom entries filtered out if ! sed --silent "/# ${OPENSHIFT_MARKER}/d; w ${TEMP_FILE}" "${HOSTS_FILE}"; then # Only continue rebuilding the hosts entries if its original content is preserved sleep 60 & wait continue fi # Append resolver entries for services rc=0 for svc in "${!svc_ips[@]}"; do for ip in ${svc_ips[${svc}]}; do echo "${ip} ${svc} ${svc}.${CLUSTER_DOMAIN} # ${OPENSHIFT_MARKER}" >> "${TEMP_FILE}" || rc=$? done done if [[ $rc -ne 0 ]]; then sleep 60 & wait continue fi # TODO: Update /etc/hosts atomically to avoid any inconsistent behavior # Replace /etc/hosts with our modified version if needed cmp "${TEMP_FILE}" "${HOSTS_FILE}" || cp -f "${TEMP_FILE}" "${HOSTS_FILE}" # TEMP_FILE is not removed to avoid file create/delete and attributes copy churn fi sleep 60 & wait unset svc_ips done env: - name: SERVICES value: image-registry.openshift-image-registry.svc - name: NAMESERVER value: 172.30.0.10 - name: CLUSTER_DOMAIN value: cluster.local image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:e155421620a4ac28a759265f53059b75308fdd1491caeba6a9a34d2fbeab4954 imagePullPolicy: IfNotPresent name: dns-node-resolver resources: requests: cpu: 5m memory: 21Mi securityContext: privileged: true terminationMessagePath: /dev/termination-log terminationMessagePolicy: FallbackToLogsOnError volumeMounts: - mountPath: /etc/hosts name: hosts-file - mountPath: /var/run/secrets/kubernetes.io/serviceaccount name: kube-api-access-8m29g readOnly: true dnsPolicy: ClusterFirst enableServiceLinks: true hostNetwork: true nodeName: master-0 nodeSelector: kubernetes.io/os: linux preemptionPolicy: PreemptLowerPriority priority: 2000001000 priorityClassName: system-node-critical restartPolicy: Always schedulerName: default-scheduler securityContext: {} serviceAccount: node-resolver serviceAccountName: node-resolver terminationGracePeriodSeconds: 30 tolerations: - operator: Exists volumes: - hostPath: path: /etc/hosts type: File name: hosts-file - name: kube-api-access-8m29g projected: defaultMode: 420 sources: - serviceAccountToken: expirationSeconds: 3607 path: token - configMap: items: - key: ca.crt path: ca.crt name: kube-root-ca.crt - downwardAPI: items: - fieldRef: apiVersion: v1 fieldPath: metadata.namespace path: namespace - configMap: items: - key: service-ca.crt path: service-ca.crt name: openshift-service-ca.crt status: conditions: - lastProbeTime: null lastTransitionTime: "2026-02-16T17:00:48Z" status: "True" type: PodReadyToStartContainers - lastProbeTime: null lastTransitionTime: "2026-02-16T17:00:47Z" status: "True" type: Initialized - lastProbeTime: null lastTransitionTime: "2026-02-16T17:24:04Z" status: "True" type: Ready - lastProbeTime: null lastTransitionTime: "2026-02-16T17:24:04Z" status: "True" type: ContainersReady - lastProbeTime: null lastTransitionTime: "2026-02-16T17:00:47Z" status: "True" type: PodScheduled containerStatuses: - containerID: cri-o://3058c1711cb9655d6e38a2730ef2bc992787bf011d890becd19ebee8f58e3d10 image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:e155421620a4ac28a759265f53059b75308fdd1491caeba6a9a34d2fbeab4954 imageID: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:e155421620a4ac28a759265f53059b75308fdd1491caeba6a9a34d2fbeab4954 lastState: {} name: dns-node-resolver ready: true restartCount: 6 started: true state: running: startedAt: "2026-02-16T17:24:04Z" volumeMounts: - mountPath: /etc/hosts name: hosts-file - mountPath: /var/run/secrets/kubernetes.io/serviceaccount name: kube-api-access-8m29g readOnly: true recursiveReadOnly: Disabled hostIP: 192.168.32.10 hostIPs: - ip: 192.168.32.10 phase: Running podIP: 192.168.32.10 podIPs: - ip: 192.168.32.10 qosClass: Burstable startTime: "2026-02-16T17:00:47Z" kind: PodList metadata: resourceVersion: "59911"