mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
34 lines
917 B
Plaintext
34 lines
917 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
|
|
|
|
[role="_abstract"]
|
|
To expose the back-end service so that it is accessible externally, create 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`.
|