Customize the Openshift console URL

本來參考官方文章

  1. Customizing the console route
  2. How to customize console URL in OpenShift 4 under the same *.apps subdomain

沒有很清楚,最後主要參考這篇文章: Customizing the OpenShift Console URL with TLS

目標

default URL: console-openshift-console.apps.foo.bar.com
customized URL: my-customized.bar.com

現況

DNS record

  • *.apps.foo.bar.com => 172.15.30.41

確認現有console URL

1
oc get route -n openshift-console

調整Ingress config調整Ingress config

1
oc edit ingress.config.openshift.io cluster
1
2
3
4
5
6
7
8
9
apiVersion: config.openshift.io/v1
kind: Ingress
metadata:
name: cluster
spec:
componentRoutes:
- name: console
namespace: openshift-console
hostname: my-customized.bar.com

新增一筆DNS Record

  • *.apps.foo.bar.com => 172.15.30.41
  • my-customized.bar.com => 172.15.30.41

確認