Code change:
procGetNetworkParams = iphlpapidll.MustFindProc("GetNetworkParams") ) <ins> func fileExists(filename string) (bool, error) { stat, err := os.Stat(filename) if os.IsNotExist(err) { return false, nil } if err != nil { return false, err } return stat.Mode().IsRegular(), nil } </ins> func getHostDNSConfig(resolverConfig string) (*runtimeapi.DNSConfig, error) { <del> if resolverConfig != "" && resolverConfig != hostResolvConf { err := fmt.Errorf(`Unexpected resolver config value: "%s". Expected "" or "%s".`, resolverConfig, hostResolvConf) </del> <ins> if resolverConfig == "" { // This handles "" by returning defaults. return getDNSConfig(resolverConfig) } isFile, err := fileExists(resolverConfig) if err != nil { err = fmt.Errorf(`Unexpected error while getting os.Stat for "%s" resolver config. Error: %w`, resolverConfig, err) </ins> klog.ErrorS(err, "Cannot get host DNS Configuration.") return nil, err } <ins> if isFile { // Get the DNS config from a resolv.conf-like file. return getDNSConfig(resolverConfig) } </ins> <del> var ( hostDNS, hostSearch []string err                 error ) </del> <ins> if resolverConfig != hostResolvConf { err := fmt.Errorf(`Unexpected resolver config value: "%s". Expected "", "%s", or a path to an existing resolv.conf file.`, resolverConfig, hostResolvConf) klog.ErrorS(err, "Cannot get host DNS Configuration.") return nil, err } // If we get here, the resolverConfig == hostResolvConf and that is not actually a file, so // it means to use the host settings. </ins> // Get host DNS settings <del> if resolverConfig == hostResolvConf { hostDNS, err = getDNSServerList() if err != nil { err = fmt.Errorf("Could not get the host's DNS Server List. Error: %w", err) klog.ErrorS(err, "Encountered error while getting host's DNS Server List.") return nil, err } hostSearch, err = getDNSSuffixList() if err != nil { err = fmt.Errorf("Could not get the host's DNS Suffix List. Error: %w", err) klog.ErrorS(err, "Encountered error while getting host's DNS Suffix List.") return nil, err } </del> <ins> hostDNS, err := getDNSServerList() if err != nil { err = fmt.Errorf("Could not get the host's DNS Server List. Error: %w", err) klog.ErrorS(err, "Encountered error while getting host's DNS Server List.") return nil, err } hostSearch, err := getDNSSuffixList() if err != nil { err = fmt.Errorf("Could not get the host's DNS Suffix List. Error: %w", err) klog.ErrorS(err, "Encountered error while getting host's DNS Suffix List.") return nil, err </ins> } return &runtimeapi.DNSConfig{ Servers:  hostDNS,

Related discussion:
text: Yeah, what used on GCE/GKE, seems to be a Linux-like conf, eg: nameserver 10.128.0.1 search c.<project_name.internal google.internal ` We haven't tried to remove from kubelet to see the behavior.
This Issue/PR has been marked as release blocker. Please have the fix merged by eod today otherwise the feature has to be reverted. For the Issue/PR owner: please have a revert/feature disable PR open today in case the fix failed to get in. Thank you! See the -- Kubernetes 1.27 release manager
I opened up a revert PR in case this PR does not merge by code freeze.
Thanks for the resolution! both 2019 and 2022 grids seems to be back to green now!
Thanks for confirming! I opened to ensure gets updated too