OpenShift - List Ingress Route using the oc get ingress 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 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.


The oc get ingress command can then be used the list the Ingress routes in the project/namespace.

~]$ oc get ingress
NAME               CLASS    HOSTS                   ADDRESS   PORTS   AGE
my-ingress-route   <none>             80      4s


The oc describe ingress command can be used to show more details about the ingress route.

~]$ oc describe ingress my-ingress-route
Name:             my-ingress-route
Namespace:        my-project
Default backend:  default-http-backend:80 (<error: endpoints "default-http-backend" not found>)
  Host                    Path  Backends
  ----                    ----  --------  
                          /my-endpoint  my-service:8080 (
Annotations:              <none>
Events:                   <none>


Or, the oc get ingress command with the --output json or --output yaml option can be used.

~]$ oc get ingress my-ingress-route --output yaml
kind: Ingress
  creationTimestamp: "2022-09-13T01:57:37Z"
  generation: 1
  name: my-ingress-route
  namespace: my-project
  resourceVersion: "492868937"
  uid: 71de4de0-368c-4e72-8a7d-ee202a076727
  - host:
      - backend:
            name: my-service
              number: 8080
        path: /my-endpoint
        pathType: Exact
  loadBalancer: {}


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 a6b03 in the box below so that we can be sure you are a human.