1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/customizing-the-web-console-URL.adoc
2024-12-17 17:29:32 +00:00

110 lines
3.8 KiB
Plaintext

// Module included in the following assemblies:
//
// * web_console/customizing-the-web-console.adoc
:_mod-docs-content-type: PROCEDURE
[id="customizing-the-web-console-url_{context}"]
= Customizing console routes
For `console` and `downloads` routes, custom routes functionality uses the `ingress` config route configuration API. If the `console` custom route is set up in both the `ingress` config and `console-operator` config, then the new `ingress` config custom route configuration takes precedent. The route configuration with the `console-operator` config is deprecated.
[id="customizing-the-console-route_{context}"]
== Customizing the console route
You can customize the console route by setting the custom hostname and TLS certificate in the `spec.componentRoutes` field of the cluster `Ingress` configuration.
.Prerequisites
* You have logged in to the cluster as a user with administrative privileges.
* You have created a secret in the `openshift-config` namespace containing the TLS certificate and key. This is required if the domain for the custom hostname suffix does not match the cluster domain suffix. The secret is optional if the suffix matches.
+
[TIP]
====
You can create a TLS secret by using the `oc create secret tls` command.
====
.Procedure
. Edit the cluster `Ingress` configuration:
+
[source,terminal]
----
$ oc edit ingress.config.openshift.io cluster
----
. Set the custom hostname and optionally the serving certificate and key:
+
[source,yaml]
----
apiVersion: config.openshift.io/v1
kind: Ingress
metadata:
name: cluster
spec:
componentRoutes:
- name: console
namespace: openshift-console
hostname: <custom_hostname> <1>
servingCertKeyPairSecret:
name: <secret_name> <2>
----
<1> The custom hostname.
<2> Reference to a secret in the `openshift-config` namespace that contains a TLS certificate (`tls.crt`) and key (`tls.key`). This is required if the domain for the custom hostname suffix does not match the cluster domain suffix. The secret is optional if the suffix matches.
. Save the file to apply the changes.
[NOTE]
====
Add a DNS record for the custom console route that points to the application ingress load balancer.
====
[id="customizing-the-download-route_{context}"]
== Customizing the download route
You can customize the download route by setting the custom hostname and TLS certificate in the `spec.componentRoutes` field of the cluster `Ingress` configuration.
.Prerequisites
* You have logged in to the cluster as a user with administrative privileges.
* You have created a secret in the `openshift-config` namespace containing the TLS certificate and key. This is required if the domain for the custom hostname suffix does not match the cluster domain suffix. The secret is optional if the suffix matches.
+
[TIP]
====
You can create a TLS secret by using the `oc create secret tls` command.
====
.Procedure
. Edit the cluster `Ingress` configuration:
+
[source,terminal]
----
$ oc edit ingress.config.openshift.io cluster
----
. Set the custom hostname and optionally the serving certificate and key:
+
[source,yaml]
----
apiVersion: config.openshift.io/v1
kind: Ingress
metadata:
name: cluster
spec:
componentRoutes:
- name: downloads
namespace: openshift-console
hostname: <custom_hostname> <1>
servingCertKeyPairSecret:
name: <secret_name> <2>
----
<1> The custom hostname.
<2> Reference to a secret in the `openshift-config` namespace that contains a TLS certificate (`tls.crt`) and key (`tls.key`). This is required if the domain for the custom hostname suffix does not match the cluster domain suffix. The secret is optional if the suffix matches.
. Save the file to apply the changes.
[NOTE]
====
Add a DNS record for the custom downloads route that points to the application ingress load balancer.
====