Configuring Eclipse Che server hostname

This procedure describes how to configure Che to use custom hostname.

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

  • The certificate and the private key files are generated.

To generate the pair of a private key and certificate, the same certification authority (CA) must be used as for other Che hosts.
Ask a DNS provider to point the custom hostname to the cluster ingress.
Procedure
  1. Pre-create a namespace for Che:

    $ kubectl create namespace eclipse-che
  2. Create a TLS secret:

    $ kubectl create secret TLS <tls-secret-name> \ (1)
    --key <key-file> \ (2)
    --cert <cert-file> \ (3)
    -n eclipse-che
    1 The TLS secret name
    2 A file with the private key
    3 A file with the certificate
  3. Add the required labels to the secret:

    $ kubectl label secret <tls-secret-name> \ (1)
    app.kubernetes.io/part-of=che.eclipse.org -n eclipse-che
    1 The TLS secret name
  4. Configure the CheCluster Custom Resource. See Using the CLI to configure the CheCluster Custom Resource.

    spec:
      networking:
        hostname: <hostname>     (1)
        tlsSecretName: <secret>  (2)
    1 Custom Eclipse Che server hostname
    2 The TLS secret name
  5. If Che has been already deployed, wait until the rollout of all Che components finishes.