1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/getting-started-cli-creating-route-backend.adoc

33 lines
947 B
Plaintext

// Module included in the following assemblies:
//
// * tutorials/dev-app-cli.adoc
:_mod-docs-content-type: PROCEDURE
[id="getting-started-cli-creating-route-backend_{context}"]
= Exposing the back-end service
Similar to how you exposed the front-end service for external clients, you must now expose the back-end service by creating a route.
.Prerequisites
* You have deployed the `nationalparks` back-end application.
* You have `cluster-admin` or project-level `admin` privileges.
.Procedure
. Create a route to expose the `nationalparks` back-end application by running the following command:
+
[source,terminal]
----
$ oc create route edge nationalparks --service=nationalparks
----
. Label the `nationalparks` route by running the following command:
+
[source,terminal]
----
$ oc label route nationalparks type=parksmap-backend
----
+
The application code expects the `nationalparks` route to be labeled with `type=parksmap-backend`.