diff --git a/installing/installing_bare_metal/upi/installing-bare-metal-network-customizations.adoc b/installing/installing_bare_metal/upi/installing-bare-metal-network-customizations.adoc index b99bb78a4f09..14f79d4c0ca1 100644 --- a/installing/installing_bare_metal/upi/installing-bare-metal-network-customizations.adoc +++ b/installing/installing_bare_metal/upi/installing-bare-metal-network-customizations.adoc @@ -69,6 +69,8 @@ include::modules/installation-dns-user-infra.adoc[leveloffset=+2] * xref:../../../installing/installing_bare_metal/upi/installing-bare-metal-network-customizations.adoc#installation-user-provisioned-validating-dns_installing-bare-metal-network-customizations[Validating DNS resolution for user-provisioned infrastructure] +include::modules/installation-bare-metal-dns-record-type.adoc[leveloffset=+2] + include::modules/installation-load-balancing-user-infra.adoc[leveloffset=+2] // Creating a manifest object that includes a customized `br-ex` bridge diff --git a/installing/installing_bare_metal/upi/installing-bare-metal.adoc b/installing/installing_bare_metal/upi/installing-bare-metal.adoc index 968d56c2cdbd..f4eae923ccc5 100644 --- a/installing/installing_bare_metal/upi/installing-bare-metal.adoc +++ b/installing/installing_bare_metal/upi/installing-bare-metal.adoc @@ -77,6 +77,8 @@ include::modules/installation-dns-user-infra.adoc[leveloffset=+2] * xref:../../../installing/installing_bare_metal/upi/installing-bare-metal.adoc#installation-user-provisioned-validating-dns_installing-bare-metal[Validating DNS resolution for user-provisioned infrastructure] +include::modules/installation-bare-metal-dns-record-type.adoc[leveloffset=+2] + // Load balancing requirements for user-provisioned infrastructure include::modules/installation-load-balancing-user-infra.adoc[leveloffset=+2] diff --git a/installing/installing_bare_metal/upi/installing-restricted-networks-bare-metal.adoc b/installing/installing_bare_metal/upi/installing-restricted-networks-bare-metal.adoc index 7cfd47898394..25e60b70211b 100644 --- a/installing/installing_bare_metal/upi/installing-restricted-networks-bare-metal.adoc +++ b/installing/installing_bare_metal/upi/installing-restricted-networks-bare-metal.adoc @@ -84,6 +84,8 @@ include::modules/installation-dns-user-infra.adoc[leveloffset=+2] * xref:../../../installing/installing_bare_metal/upi/installing-restricted-networks-bare-metal.adoc#installation-user-provisioned-validating-dns_installing-restricted-networks-bare-metal[Validating DNS resolution for user-provisioned infrastructure] +include::modules/installation-bare-metal-dns-record-type.adoc[leveloffset=+2] + include::modules/installation-load-balancing-user-infra.adoc[leveloffset=+2] // Creating a manifest object that includes a customized `br-ex` bridge diff --git a/modules/installation-bare-metal-dns-record-type.adoc b/modules/installation-bare-metal-dns-record-type.adoc new file mode 100644 index 000000000000..81ee5327eecb --- /dev/null +++ b/modules/installation-bare-metal-dns-record-type.adoc @@ -0,0 +1,62 @@ +// Module included in the following assemblies: +// +// * installing/installing_bare_metal/upi/installing-bare-metal-network-customizations.adoc +// * installing/installing_bare_metal/upi/installing-bare-metal.adoc +// * installing/installing_bare_metal/upi/installing-restricted-networks-bare-metal.adoc + +:_mod-docs-content-type: CONCEPT +[id="installation-bare-metal-dns-record-type_{context}"] += Configuring the DnsRecordsType parameter + +[role="_abstract"] +You can use the `DnsRecordsType` parameter in your `infrastructure.config.openshift.io` custom resource (CR) to set if the internal DNS service or an external source provides the necessary records for `api`, `api-int`, and `ingress` DNS records. + +:FeatureName: Configuring the DnsRecordsType parameter +include::snippets/technology-preview.adoc[] + +To use the parameter, you must enable the `OnPremDNSRecords` feature gate in the `config.yaml` file. + +The `dnsRecordsType` parameter supports the following values: + +* `Internal`: The default value. Setting this value causes the cluster infrastructure to automatically create and maintain the necessary DNS records. +* `External`: You can use this value only if you set the `loadBalancer.type` parameter to `UserManaged`. The cluster does not manage the DNS records. You must manually configure DNS records on an external DNS server. + +.Prerequisites + +* You created DNS records, such as `api`, `api-int`, or `\*.apps`. +* You configured a user-managed load balancer for your cluster. +* If you intend on setting `dnsRecordsType.External` in the `infrastructure.config.openshift.io` CR , you must initially configure cluster nodes to use the specific external server for DNS resolution. + +.Procedure + +. Edit the `featuregate.config.openshift.io/cluster` CR and set the `featureSet.customNoUpgrade.enabled` parameter to the `OnPremDNSRecords` value: ++ +[source,yaml] +---- +apiVersion: config.openshift.io/v1 +kind: FeatureGate +metadata: + name: cluster +spec: + featureSet: CustomNoUpgrade + customNoUpgrade: + enabled: + - OnPremDNSRecords +# ... +---- + +* Edit your `infrastructure.config.openshift.io` CR by setting the `dnsRecordsType` parameter to the `External` value: ++ +[source,yaml] +---- +apiVersion: config.openshift.io/v1 +kind: Infrastructure +metadata: + name: cluster +spec: + platformSpec: + baremetal: + dnsRecordsType: External +# ... +---- + diff --git a/modules/nw-dns-forward.adoc b/modules/nw-dns-forward.adoc index 24bddd28dac9..e5d695499a2b 100644 --- a/modules/nw-dns-forward.adoc +++ b/modules/nw-dns-forward.adoc @@ -20,9 +20,11 @@ endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[] * Provide a list of upstream DNS servers (`spec.upstreamResolvers`). * Change the default forwarding policy. -[NOTE] -==== A DNS forwarding configuration for the default domain can have both the default servers specified in the `/etc/resolv.conf` file and the upstream DNS servers. + +[IMPORTANT] +==== +During pod creation, Kubernetes uses the `/etc/resolv.conf` file that exists on a node. If you modify the `/etc/resolv.conf` file on a host node, the changes do not propagate to the `/etc/resolv.conf` file that exists in a container. You must recreate the container for changes to take effect. ==== .Procedure diff --git a/modules/virt-example-nmstate-IP-management.adoc b/modules/virt-example-nmstate-IP-management.adoc index 0d89a7459916..2a02b16af2dd 100644 --- a/modules/virt-example-nmstate-IP-management.adoc +++ b/modules/virt-example-nmstate-IP-management.adoc @@ -139,6 +139,11 @@ The following example shows a default situation that stores DNS values globally: * Configure a static DNS without a network interface. Note that when updating the `/etc/resolv.conf` file on a host node, you do not need to specify an interface, IPv4 or IPv6, in the `NodeNetworkConfigurationPolicy` (NNCP) manifest. + +[IMPORTANT] +==== +During pod creation, Kubernetes uses the `/etc/resolv.conf` file that exists on a node. If you modify the `/etc/resolv.conf` file on a host node, the changes do not propagate to the `/etc/resolv.conf` file that exists in a container. You must recreate the container for changes to take effect. +==== ++ Example of a DNS configuration for a network interface that globally stores DNS values: + [source,yaml]