openshift / origin-web-console

Web Console for the OpenShift Application Platform
https://www.openshift.org/
Apache License 2.0
123 stars 230 forks source link

How to change/add webconsole URL after installation of OKD4? #3172

Closed khodayard closed 4 years ago

khodayard commented 4 years ago

Hi,

I've installed OKD4 with lab.okd.local as cluster name. now I want to access it through an internet name like: console.okd4.mydomain.com

Is it possible?

I've read in the docs here: https://docs.openshift.com/container-platform/4.4/web_console/configuring-web-console.html that changing web console URL is not possible, how about adding another one?

I’ve added two routes similar to console and oauth routes but these seem not enough. Web console redirects to okd.local automatically.

Thanks, Khodayar

spadgett commented 4 years ago

Hi @khodayard. It's not possible today, although it will be possible in 4.5. See https://github.com/openshift/api/pull/594

$ oc explain consoles.spec.route --api-version=operator.openshift.io/v1
KIND:     Console
VERSION:  operator.openshift.io/v1
RESOURCE: route <Object>
DESCRIPTION:
     route contains hostname and secret reference that contains the serving
     certificate. If a custom route is specified, a new route will be created
     with the provided hostname, under which console will be available. In case
     of custom hostname uses the default routing suffix of the cluster, the
     Secret specification for a serving certificate will not be needed. In case
     of custom hostname points to an arbitrary domain, manual DNS configurations
     steps are necessary. The default console route will be maintained to
     reserve the default hostname for console if the custom route is removed. If
     not specified, default route will be used.
FIELDS:
   hostname     <string>
     hostname is the desired custom domain under which console will be
     available.
   secret       <Object>
     secret points to secret in the openshift-config namespace that contains
     custom certificate and key and needs to be created manually by the cluster
     admin. Referenced Secret is required to contain following key value pairs:
     - "tls.crt" - to specifies custom certificate - "tls.key" - to specifies
     private key of the custom certificate If the custom hostname uses the
     default routing suffix of the cluster, the Secret specification for a
     serving certificate will not be needed.

Note that https://github.com/openshift/console/ is the repo for the 4.x console. Thanks!

/close

openshift-ci-robot commented 4 years ago

@spadgett: Closing this issue.

In response to [this](https://github.com/openshift/origin-web-console/issues/3172#issuecomment-648814541): >Hi @khodayard. It's not possible today, although it will be possible in 4.5. See https://github.com/openshift/api/pull/594 > >``` >$ oc explain consoles.spec.route --api-version=operator.openshift.io/v1 >KIND: Console >VERSION: operator.openshift.io/v1 >RESOURCE: route >DESCRIPTION: > route contains hostname and secret reference that contains the serving > certificate. If a custom route is specified, a new route will be created > with the provided hostname, under which console will be available. In case > of custom hostname uses the default routing suffix of the cluster, the > Secret specification for a serving certificate will not be needed. In case > of custom hostname points to an arbitrary domain, manual DNS configurations > steps are necessary. The default console route will be maintained to > reserve the default hostname for console if the custom route is removed. If > not specified, default route will be used. >FIELDS: > hostname > hostname is the desired custom domain under which console will be > available. > secret > secret points to secret in the openshift-config namespace that contains > custom certificate and key and needs to be created manually by the cluster > admin. Referenced Secret is required to contain following key value pairs: > - "tls.crt" - to specifies custom certificate - "tls.key" - to specifies > private key of the custom certificate If the custom hostname uses the > default routing suffix of the cluster, the Secret specification for a > serving certificate will not be needed. >``` > >Note that https://github.com/openshift/console/ is the repo for the 4.x console. Thanks! > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.