July 2018
Intermediate to advanced
504 pages
11h 34m
English
Let's create an alternate route for our application named httpd2. The route will have the myhttpd.example.com URL:
$ cat <<EOF > route-httpd2.ymlapiVersion: v1kind: Routemetadata: labels: name: httpd2 name: httpd2spec: host: myhttpd.example.com port: targetPort: 8080 to: kind: Service name: httpd weight: 100EOF
The route may be created by oc create:
$ oc create -f route-httpd2.ymlroute "httpd2" created$ oc get routeNAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARDhttpd httpd-simpleappication.127.0.0.1.nip.io httpd 8080 Nonehttpd1 httpd.example.com httpd 8080 Nonehttpd2 myhttpd.example.com httpd 8080 None
You may see that the new route has been added successfully. Now, if there is a corresponding ...