Bug 2020350

Summary: Windows Containers on Windows Nodes get assigned the DNS Server IP “172.30.0.10”, which is wrong, if the default kubernetes subnet is not used
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: Windows ContainersAssignee: jvaldes
Status: CLOSED ERRATA QA Contact: Ronnie Rasouli <rrasouli>
Severity: high Docs Contact:
Priority: high    
Version: 4.8CC: aliryan, aos-bugs, jvaldes, mohashai, rrasouli
Target Milestone: ---   
Target Release: 4.9.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Hard-coded Cluster DNS (172.30.0.10) in kubelet configuration template. Consequence: Windows Containers on Windows Nodes get assigned a wrong DNS Server IP, hence DNS resolution does not work. Fix: Remove the hard-coded Cluster DNS information and parametrize the value as a command-line argument. Result: Windows Containers on Windows Nodes get assigned a valid DNS Server IP and DNS resolution works for Windows workloads.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-28 07:38:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1994859    
Bug Blocks: 2030943    

Comment 1 Ronnie Rasouli 2022-02-13 09:42:09 UTC
type kubelet.conf
{"kind":"KubeletConfiguration","apiVersion":"kubelet.config.k8s.io/v1beta1","rotateCertificates":true,"serverTLSBootstrap":true,"authentication":{"x509":{"clientCAFile":"c:\\k\\kubelet-ca.crt "},"anonymous":{"enabled":false}},"clusterDomain":"cluster.local","clusterDNS":["172.30.0.10"],"cgroupsPerQOS":false,"runtimeRequestTimeout":"10m0s","maxPods":250,"kubeAPIQPS":50,"kubeAPIBurst":100,"serializeImagePulls":false,"featureGates":{"LegacyNodeRoleBehavior":false,"NodeDisruptionExclusion":true,"RotateKubeletServerCertificate":true,"SCTPSupport":true,"ServiceNodeExclusion":true,"SupportPodPidsLimit":true},"containerLogMaxSize":"50Mi","systemReserved":{"cpu":"500m","ephemeral-storage":"1Gi","memory":"1Gi"},"enforceNodeAllocatable":[]}

apiVersion: config.openshift.io/v1
kind: Network
metadata:
  creationTimestamp: "2022-02-13T07:47:25Z"
  generation: 2
  name: cluster
  resourceVersion: "3306"
  uid: 98a08117-cf95-4a7e-a8b6-d9d11fa8427e
spec:
  clusterNetwork:
  - cidr: 10.128.0.0/14
    hostPrefix: 23
  externalIP:
    policy: {}
  networkType: OVNKubernetes
  serviceNetwork:
  - 172.30.0.0/16
status:
  clusterNetwork:
  - cidr: 10.128.0.0/14
    hostPrefix: 23
  clusterNetworkMTU: 8901
  networkType: OVNKubernetes
  serviceNetwork:
  - 172.30.0.0/16

Verified on version:
"version":"3.1.1+e2511da1"

Comment 4 errata-xmlrpc 2023-03-28 07:38:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenShift support for Windows Containers 4.0.2 product release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:1488