diff --git a/modules/k8s-nmstate-deploying-nmstate-CLI.adoc b/modules/k8s-nmstate-deploying-nmstate-CLI.adoc index f4a1d771a942..ac4efa53e065 100644 --- a/modules/k8s-nmstate-deploying-nmstate-CLI.adoc +++ b/modules/k8s-nmstate-deploying-nmstate-CLI.adoc @@ -92,6 +92,23 @@ metadata: EOF ---- +. Optional: If your cluster gets disconnected from a DNS server because of DNS connectivity issues, you can add the following DNS hostname configuration to the `NMState` CRD to build in health checks that can resolve these issues: ++ +[source,terminal] +---- +apiVersion: nmstate.io/v1 +kind: NMState +metadata: + name: nmstate +spec: + probeConfiguration: + dns: + host: redhat.com +# ... +---- + +.Verification + . Verify that all pods for the NMState Operator are in a `Running` state: + [source,terminal] diff --git a/modules/k8s-nmstate-troubleshooting-dns-disconnected-env-resolv.adoc b/modules/k8s-nmstate-troubleshooting-dns-disconnected-env-resolv.adoc new file mode 100644 index 000000000000..5ad56f342ed2 --- /dev/null +++ b/modules/k8s-nmstate-troubleshooting-dns-disconnected-env-resolv.adoc @@ -0,0 +1,27 @@ +// Module included in the following assemblies: +// +// * networking/k8s_nmstate/k8s-nmstate-troubleshooting-node-network.adoc + +:_mod-docs-content-type: PROCEDURE +[id="k8s-nmstate-troubleshooting-dns-disconnected-env-resolv.adoc_{context}"] += Creating a custom DNS host name to resolve DNS connectivity issues + +In a disconnected environment where a host server cannot be reached, you can resolve DNS connectivity issues by specifying a custom DNS host name in the `NMState` custom resource definition (CRD). The Kubernetes NMState Operator adds the custom DNS host name to the `/etc/resolv.conf` file. If your cluster gets disconnected, the Operator reads the `/etc/resolv.conf` and uses the custom DNS host name to resolve the DNS connectivity issue. + +.Procedure + +* Add the DNS host name configuration to the `NMState` CRD of your cluster: ++ +[source,terminal] +---- +apiVersion: nmstate.io/v1 +kind: NMState +metadata: + name: nmstate +spec: + probeConfiguration: + dns: + host: redhat.com +# ... +---- + diff --git a/modules/k8s-nmstate-troubleshooting-dns-disconnected-env.adoc b/modules/k8s-nmstate-troubleshooting-dns-disconnected-env.adoc index 59101a1b8c75..d6cc2c11ff84 100644 --- a/modules/k8s-nmstate-troubleshooting-dns-disconnected-env.adoc +++ b/modules/k8s-nmstate-troubleshooting-dns-disconnected-env.adoc @@ -6,7 +6,7 @@ [id="troubleshooting-dns-disconnected-env_{context}"] = Troubleshooting DNS connectivity issues in a disconnected environment -If you experience DNS connectivity issues when configuring `nmstate` in a disconnected environment, you can configure the DNS server to resolve the list of name servers for the domain `root-servers.net`. +If you experience DNS connectivity issues when configuring `nmstate` in a disconnected environment, you can configure the DNS server to resolve the list of name servers for the domain `root-servers.net`. Alternatively, you can resolve DNS connectivity issues by configuring a custom host name and then using the hostname to perform internal networking health checks on your cluster. [IMPORTANT] ==== @@ -15,8 +15,7 @@ Ensure that the DNS server includes a name server (NS) entry for the `root-serve == Configuring the bind9 DNS named server -For a cluster configured to query a `bind9` DNS server, you can add the `root-servers.net` zone to a configuration file that contains at least one NS record. -For example you can use the `/var/named/named.localhost` as a zone file that already matches this criteria. +For a cluster configured to query a `bind9` DNS server, you can add the `root-servers.net` zone to a configuration file that contains at least one NS record. For example you can use the `/var/named/named.localhost` as a zone file that already matches this criteria. .Procedure @@ -69,4 +68,4 @@ Name: 127.0.0.1 Address: 127.0.0.53 Aliases: root-servers.net name server root-servers.net. ----- \ No newline at end of file +---- diff --git a/networking/k8s_nmstate/k8s-nmstate-troubleshooting-node-network.adoc b/networking/k8s_nmstate/k8s-nmstate-troubleshooting-node-network.adoc index f063c995cc60..aa7d0dc6ec60 100644 --- a/networking/k8s_nmstate/k8s-nmstate-troubleshooting-node-network.adoc +++ b/networking/k8s_nmstate/k8s-nmstate-troubleshooting-node-network.adoc @@ -14,8 +14,14 @@ This includes issues such as: * The host loses connection to the default gateway. * The host loses connection to the API server. +// Troubleshooting an incorrect node network configuration policy configuration include::modules/virt-troubleshooting-incorrect-policy-config.adoc[leveloffset=+1] +// Troubleshooting DNS connectivity issues in a disconnected environment include::modules/k8s-nmstate-troubleshooting-dns-disconnected-env.adoc[leveloffset=+1] +// Creating a custom DNS host name to resolve DNS connectivity issues +include::modules/k8s-nmstate-troubleshooting-dns-disconnected-env-resolv.adoc[leveloffset=+2] + +// Configuring the dnsmasq DNS server include::modules/k8s-nmstate-troubleshooting-dns-disconnected-env-dnsmasq.adoc[leveloffset=+2] \ No newline at end of file