OpenShift - List Ingress Routers using the oc get services command

If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.

An OpenShift route or an Ingress route will provide a URL such as http://route001-project001.apps.openshift.example.com:8080 which is used to route a request onto a service, which is then routed onto a pod, and then to the container in the pod, and finally to the application running in the container.

 

Like this.

 

Egress provides a way for an application deployed on OpenShift to access an external URL, such as http://www.example.com.

 

The Ingress Controllers and Ingress Routers are responsible for allowing external requests access to routes/services/pods/apps.

The oc get ingresscontroller command can be used to list the Ingress Controllers which are in the openshift-ingress-operator namespace.

~]$ oc get ingresscontroller --namespace openshift-ingress-operator
NAME              AGE
default           360d
external-router   356d
internal-router   356d

 

The oc get services command can be used to list the Ingress Routers which are in the openshift-ingress namespace.

~]$ oc get services --namespace openshift-ingress
NAME                              TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
router-internal-default           ClusterIP   172.30.147.55    <none>        80/TCP,443/TCP,1936/TCP      423d
router-internal-external-router   ClusterIP   172.30.173.34    <none>        80/TCP,443/TCP,1936/TCP      419d
router-internal-internal-router   ClusterIP   172.30.209.168   <none>        80/TCP,443/TCP,1936/TCP      419d
router-nodeport-external-router   NodePort    172.30.21.4      <none>        80:32080/TCP,443:32443/TCP   419d
router-nodeport-internal-router   NodePort    172.30.185.219   <none>        80:31080/TCP,443:31443/TCP   419d

 

The oc describe service command can be used to display more information about an Ingress Router.

~]$ oc describe service router-internal-default --namespace openshift-ingress
Name:              router-internal-default
Namespace:         openshift-ingress
Labels:            ingresscontroller.operator.openshift.io/owning-ingresscontroller=default
Annotations:       service.alpha.openshift.io/serving-cert-secret-name: router-metrics-certs-default
                   service.alpha.openshift.io/serving-cert-signed-by: openshift-service-serving-signer@1626455578
                   service.beta.openshift.io/serving-cert-signed-by: openshift-service-serving-signer@1626455578
Selector:          ingresscontroller.operator.openshift.io/deployment-ingresscontroller=default
Type:              ClusterIP
IP Family Policy:  SingleStack
IP Families:       IPv4
IP:                172.30.147.55
IPs:               172.30.147.55
Port:              http  80/TCP
TargetPort:        http/TCP
Endpoints:         10.84.188.69:80,10.84.188.90:80,10.84.188.91:80
Port:              https  443/TCP
TargetPort:        https/TCP
Endpoints:         10.84.188.69:443,10.84.188.90:443,10.84.188.91:443
Port:              metrics  1936/TCP
TargetPort:        1936/TCP
Endpoints:         10.84.188.69:1936,10.84.188.90:1936,10.84.188.91:1936
Session Affinity:  None
Events:            <none>

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee

Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.





Please enter 78d69 in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |