Problem:
Currently, in the Operating System Manager (OSM) addon deployment, the -cluster-dns argument is only set if features.nodeLocalDNS.deploy is true. Reference logic https://github.com/kubermatic/kubeone/blob/main/addons/operating-system-manager/deployment-controller.yaml#L49-L51
If nodeLocalDNS is disabled it (set to false) in kubeone.yaml, the flag is omitted entirely. This prevents nodes from receiving a DNS server configuration via kubelet, causing name resolution failures. Additionally, there is currently no way for a user to manually override or specify a custom DNS server IP within the KubeOneCluster manifest.
Proposed Changes:
- Fix Default Logic: Ensure that if nodeLocalDNS is disabled, the
-cluster-dns flag defaults to the CoreDNS service IP (typically IP ending with .10 from the serviceSubnet range defined in KubeOneCluster manifest) instead of being omitted.
- Make Configurable: Update the KubeOneCluster CRD to allow users to explicitly define the Cluster DNS IP.
Suggested API Addition:
apiVersion: kubeone.k8c.io/v1beta2
kind: KubeOneCluster
...
clusterNetwork:
serviceSubnet: "10.224.0.0/12"
dnsServiceIP: "10.224.0.10" # New optional field to override the default
Expected Behavior:
- If
dnsServiceIP is provided in the CRD, OSM should use that value.
- If not provided and
nodeLocalDNS is enabled, use the NodeLocalDNS IP.
- If not provided and
nodeLocalDNS is disabled, use the default CoreDNS ClusterIP.
Problem:
Currently, in the Operating System Manager (OSM) addon deployment, the
-cluster-dnsargument is only set iffeatures.nodeLocalDNS.deployistrue. Reference logic https://github.com/kubermatic/kubeone/blob/main/addons/operating-system-manager/deployment-controller.yaml#L49-L51If nodeLocalDNS is disabled it (set to
false) inkubeone.yaml, the flag is omitted entirely. This prevents nodes from receiving a DNS server configuration via kubelet, causing name resolution failures. Additionally, there is currently no way for a user to manually override or specify a custom DNS server IP within the KubeOneCluster manifest.Proposed Changes:
-cluster-dnsflag defaults to the CoreDNS service IP (typically IP ending with.10from the serviceSubnet range defined in KubeOneCluster manifest) instead of being omitted.Suggested API Addition:
Expected Behavior:
dnsServiceIPis provided in the CRD, OSM should use that value.nodeLocalDNSis enabled, use the NodeLocalDNS IP.nodeLocalDNSis disabled, use the default CoreDNS ClusterIP.