1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00

initial update to add dns file and update the assembly

This commit is contained in:
Tami Love
2026-01-16 21:36:02 -05:00
committed by openshift-cherrypick-robot
parent 493d1b68c2
commit 92932b2020
3 changed files with 52 additions and 0 deletions

View File

@@ -21,6 +21,8 @@ include::modules/microshift-nw-advertise-address.adoc[leveloffset=+2]
include::modules/microshift-config-nodeport-limits.adoc[leveloffset=+2]
include::modules/microshift-config-resolve-custom-hostnames.adoc[leveloffset=+2]
[id="additional-resources_microshift-using-config-yaml"]
[role="_additional-resources"]
== Additional resources

View File

@@ -74,6 +74,14 @@ The following table explains {microshift-short} configuration YAML parameters an
|`valid domain`
|Base domain of the node. All managed DNS records are subdomains of this base.
|`dns.hosts.status`
|`Enabled`, `Disabled`
|Default set to `Disabled` when not configured.
|`dns.hosts.file`
|`String`
|Filepath by default set to `/etc/hosts`.
|`etcd.memoryLimitMB`
|`number`
|By default, `etcd` uses as much memory as needed to handle the load on the system. However, in memory constrained systems, it might be preferred or necessary to limit the amount of memory `etcd` can to use at a given time.

View File

@@ -0,0 +1,42 @@
// Module included in the following assemblies:
//
// * microshift_configuring/microshift-using-config-yaml.adoc
:_mod-docs-content-type: PROCEDURE
[id="microshift-resolve-custom-hostnames_{context}"]
= Configuring custom hostnames
[role="_abstract"]
You can use the `hosts` file to resolve custom hostnames for pod workloads. This enables applications to resolve fixed hostnames, such as the local machine or external services, by applying `/etc/hosts` functionality to DNS queries within the node. The functionality is applied by adding specific configuration to the {microshift-short} configuration YAML file, and completing a service restart.
.Prerequisites
* You installed the OpenShift CLI (`oc`).
* You have root access to the node.
.Procedure
. Edit the {microshift-short} configuration in the `/etc/microshift/config.yaml` file.
. Add the following `hosts` configuration at the end of the file:
+
[source,yaml]
----
dns:
hosts:
status: <Enabled|Disabled>
file: <filepath>
----
. Save your configuration YAML file.
. Restart the {microshift-short} service to activate the configuration changes:
+
[source,terminal]
----
$ sudo systemctl restart microshift
----
+
After this initial restart, if `dns.hosts.status` is set to `Enabled`, {microshift-short} automatically monitors the `dns.hosts.file` file for updates. You do not have to restart the {microshift-short} service until the {microshift-short} configuration YAML file is changed again.
+
[NOTE]
====
After you save the `/etc/hosts` file, it takes up to 90 seconds for the change to be active in the pods. During this period, the pods might not properly resolve hostnames.
====