How can I rename route that has been created via web console?
I go to Applications>Routes
, selected route name, then Action>Edit YAML
and I want to achieve the following change, from test.site
into old.test.site
Current route yml config
...
metadata:
name: test
selfLink: /oapi/v1/namespaces/keycloak/routes/test
...
spec:
host: test.site
...
status:
ingress:
- conditions:
- lastTransitionTime: '2017-12-13T02:19:22Z'
status: 'True'
type: Admitted
host: test.site
Attempt
...
metadata:
name: test
selfLink: /oapi/v1/namespaces/keycloak/routes/test
...
spec:
host: old.test.site
...
status:
ingress:
- conditions:
- lastTransitionTime: '2017-12-13T02:19:22Z'
status: 'True'
type: Admitted
host: old.test.site
I get the following error messages:
Failed to process the resource. Reason: Route "test" is invalid: spec.host: Invalid value: "old.test.site": field is immutable
oc get route test -o yaml > route.yaml
. Then edit theroute.yaml
and runoc replace route test -f route.yaml
. Thereplace
action may allow you to do it. Else after editing local copy, tryoc delete route test
andoc apply route test -f route.yaml
. In doing this, when edit the file, you can delete the wholestatus
section. – Graham Dumpleton