Use a custom hostname for the OpenShift Dev Spaces dashboard instead of the default cluster-assigned URL to align with corporate DNS standards and branding requirements.
Before you begin
- You have an active
oc session with administrative permissions to the OpenShift cluster. See Getting started with the CLI.
- You have the certificate and the private key files generated by the same certification authority (CA) used for other OpenShift Dev Spaces hosts.
- You have the custom hostname configured to point to the cluster ingress with your DNS provider.
Procedure
-
Pre-create a project for OpenShift Dev Spaces:
$ oc create project openshift-devspaces
-
Create a TLS secret:
$ oc create secret tls <tls_secret_name> \
--key <key_file> \
--cert <cert_file> \
-n openshift-devspaces
where:
-
<tls_secret_name>
- The TLS secret name.
-
--key
- A file with the private key.
-
--cert
- A file with the certificate.
-
Add the required labels to the secret:
$ oc label secret <tls_secret_name> \
app.kubernetes.io/part-of=che.eclipse.org -n openshift-devspaces
where:
-
<tls_secret_name>
- The TLS secret name.
-
Configure the
CheCluster Custom Resource:
spec:
networking:
hostname: <hostname>
tlsSecretName: <secret>
where:
-
<hostname>
- Custom Red Hat OpenShift Dev Spaces server hostname.
-
<secret>
- The TLS secret name.
-
If OpenShift Dev Spaces is already deployed, wait for the rollout of all OpenShift Dev Spaces components to complete.
Results
- Verify that the OpenShift Dev Spaces Dashboard is accessible at the custom hostname.