Set a custom domain for workspace URLs

Set the base domain used for workspace endpoint URLs when you need workspace routes served from a different domain than the dashboard.

Prerequisites
  • An active kubectl session with administrative permissions to the destination Kubernetes cluster. See Overview of kubectl.

  • A DNS domain name configured to resolve to the cluster ingress where workspace routes will be served.

By default, Che Operator automatically detects the base domain. To change it, you need to configure the CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN__SUFFIX property in the CheCluster Custom Resource.

spec:
  components:
    cheServer:
      extraProperties:
        CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN__SUFFIX: "<...>" (1)
1 Workspace endpoints base domain, for example, my-che.example.com.
Procedure
  1. Configure the workspace endpoints base domain:

    kubectl patch checluster/eclipse-che \
        --namespace eclipse-che \
        --type='merge' -p \
    '{"spec":
        {"components":
            {"cheServer":
                {"extraProperties":
                    {"CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN__SUFFIX": "my-che.example.com"}}}}}'