CentOS Stream 9
Sponsored Link

OKD 4 : Access to Web Console2022/08/02

 
Access to Web Console of OKD 4 Cluster.
This example is based on the environment like follows.
--------------+----------------+-----------------+--------------
              |10.0.0.25       |                 |10.0.0.24
+-------------+-------------+  |  +--------------+-------------+
|   [mgr.okd4.srv.world]    |  |  | [bootstrap.okd4.srv.world] |
|        Manager Node       |  |  |       Bootstrap Node       |
|           DNS             |  |  |                            |
|          Nginx            |  |  |                            |
+---------------------------+  |  +----------------------------+
                               |
--------------+----------------+-----------------+--------------
              |10.0.0.40       |                 |10.0.0.41
+-------------+-------------+  |  +--------------+-------------+
| [master-0.okd4.srv.world] |  |  |  [master-1.okd4.srv.world] |
|      Control Plane#1      |  |  |      Control Plane#2       | 
|                           |  |  |                            |
|                           |  |  |                            |
+---------------------------+  |  +----------------------------+
                               |
--------------+----------------+
              |10.0.0.42
+-------------+-------------+
| [master-2.okd4.srv.world] |
|      Control Plane#3      |
|                           |
|                           |
+---------------------------+

[1] Make sure the access URL and authentication info on Manager Node.
On this example, access URL is [https://console-openshift-console.apps.okd4.srv.world].
[root@mgr ~]#
oc get routes -A

NAMESPACE                  NAME                      HOST/PORT                                                          PATH        SERVICES            PORT    TERMINATION            WILDCARD
openshift-authentication   oauth-openshift           oauth-openshift.apps.okd4.srv.world                                            oauth-openshift     6443    passthrough/Redirect   None
openshift-console          console                   console-openshift-console.apps.okd4.srv.world                                  console             https   reencrypt/Redirect     None
openshift-console          downloads                 downloads-openshift-console.apps.okd4.srv.world                                downloads           http    edge/Redirect          None
openshift-ingress-canary   canary                    canary-openshift-ingress-canary.apps.okd4.srv.world                            ingress-canary      8080    edge/Redirect          None
openshift-monitoring       alertmanager-main         alertmanager-main-openshift-monitoring.apps.okd4.srv.world         /api        alertmanager-main   web     reencrypt/Redirect     None
openshift-monitoring       prometheus-k8s            prometheus-k8s-openshift-monitoring.apps.okd4.srv.world            /api        prometheus-k8s      web     reencrypt/Redirect     None
openshift-monitoring       prometheus-k8s-federate   prometheus-k8s-federate-openshift-monitoring.apps.okd4.srv.world   /federate   prometheus-k8s      web     reencrypt/Redirect     None
openshift-monitoring       thanos-querier            thanos-querier-openshift-monitoring.apps.okd4.srv.world            /api        thanos-querier      web     reencrypt/Redirect     None
# [SERVICES] - [console] line is the target one

[root@mgr ~]#
cat okd4/auth/kubeadmin-password

aaaaa-bbbbb-ccccc-ddddd
[2]
If you installed Desktop environment on Manager Node, easily access to the target URL with web browser on the Node.
For other computers, add Manager Node to DNS client setting for name resolution,
otherwise, if computers can resolve names as the same with Manager Node without adding Manager Node to DNS client setting, they can access to the Web console URL.
For example on this tutorial, client computers need to resolve names [*.apps.okd4.srv.world] to [10.0.0.25].
After accessing to the URL, login form is shown.
It's possible to login with user [kubeadmin], password is the one you confirmed on [1].
Matched Content