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

46 lines
1.4 KiB
Plaintext

// Module included in the following assemblies:
//
// * tutorials/dev-app-cli.adoc
:_mod-docs-content-type: PROCEDURE
[id="getting-started-cli-creating-route_{context}"]
= Exposing the front-end service
[role="_abstract"]
By default, services running on {product-title} are not accessible externally. To expose your service so that external clients can access it, you can create a _route_.
A `Route` object is a {product-title} networking resource similar to a Kubernetes `Ingress` object. The default {product-title} router (HAProxy) uses the HTTP header of the incoming request to determine where to proxy the connection.
Optionally, you can define security, such as TLS, for the route.
.Prerequisites
* You have deployed the `parksmap` front-end application.
* You have `cluster-admin` or project-level `admin` privileges.
.Procedure
* Create a route to expose the `parksmap` front-end application by running the following command:
+
[source,terminal]
----
$ oc create route edge parksmap --service=parksmap
----
.Verification
* Verify that the application route was successfully created by running the following command:
+
[source,terminal]
----
$ oc get route parksmap
----
+
.Example output
[source,terminal]
----
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
parksmap parksmap-user-getting-started.apps.cluster.example.com parksmap 8080-tcp edge None
----