OpenShift - Resolve route automatically recreating
                
            
            
            
             
            
            
                           
                
            
            
            
                
    
    
     
            
                
                    by
                    Jeremy Canfield  |  
                    Updated: January 26 2023
                    
                          |  OpenShift articles
                    
                    
                    
                
            
            Let's say you have a route named my-route-mxhmp
~]# oc get routes
NAME              HOST/PORT                                          PATH   SERVICES     PORT     TERMINATION          WILDCARD
my-route-mxhmp    my-route-my-project.apps.openshift.example.com     /      my-service   8080     reencrypt/Redirect   None
And you delete the route.
~]$ oc delete route my-route-mxhmp
route.route.openshift.io "my-route-mxhmp" deleted
And a new route is immediately recreated. In fact, when there is a path (just the forward slash in this example) this is your clue or hint that there is an ingress route.
~]# oc get routes
NAME              HOST/PORT                                          PATH   SERVICES     PORT     TERMINATION          WILDCARD
my-route-chkgz    my-route-my-project.apps.openshift.example.com     /      my-service   8080     reencrypt/Redirect   None
This almost always suggests that there is an ingress route that is automatically recreating the route.
~]$ oc get ingress
NAME       CLASS    HOSTS                                            ADDRESS   PORTS   AGE
my-route   <none>   my-route-my-project.apps.openshift.example.com   /         80      4s
If you want to permanently delete the route, you would delete the ingress route.
~]$ oc delete ingress my-route
ingress.networking.k8s.io "my-route" deleted
Did you find this article helpful?
If so, consider buying me a coffee over at 