Skip to content

Commit 490c78d

Browse files
committed
OSDOCS-11434: remove project-based route config MicroShift
1 parent 4f6516c commit 490c78d

File tree

2 files changed

+69
-3
lines changed

2 files changed

+69
-3
lines changed

microshift_networking/microshift-configuring-routes.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ toc::[]
99
You can configure routes for {microshift-short} for clusters.
1010

1111
//OCP module, edit with care; Creating an insecure/http route
12-
include::modules/nw-creating-a-route.adoc[leveloffset=+1]
12+
include::modules/microshift-nw-create-http-based-route.adoc[leveloffset=+1]
1313

1414
//OCP module, edit with care; HTTP Strict Transport Security
15-
include::modules/nw-enabling-hsts.adoc[leveloffset=+2]
15+
include::modules/nw-enabling-hsts.adoc[leveloffset=+1]
1616

1717
//OCP module, edit with care; Enabling HTTP strict transport security per-route
18-
include::modules/nw-enabling-hsts-per-route.adoc[leveloffset=+2]
18+
include::modules/nw-enabling-hsts-per-route.adoc[leveloffset=+1]
1919

2020
//OCP module, edit with care; Disabling HTTP strict transport security per-route
2121
include::modules/nw-disabling-hsts.adoc[leveloffset=+2]
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * microshift_networking/microshift-configuring-routes.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="microshift-nw-creating-a-route_{context}"]
7+
= Creating an HTTP-based route
8+
9+
A route allows you to host your application at a public URL. It can either be secure or unsecured, depending on the network security configuration of your application. An HTTP-based route is an unsecured route that uses the basic HTTP routing protocol and exposes a service on an unsecured application port.
10+
11+
The following procedure describes how to create a simple HTTP-based route to a web application, using the `hello-microshift` application as an example.
12+
13+
.Prerequisites
14+
* You installed the OpenShift CLI (`oc`).
15+
* You have access to your {microshift-short} cluster.
16+
* You have a web application that exposes a port and a TCP endpoint listening for traffic on the port.
17+
18+
.Procedure
19+
20+
. Create a service called `hello-microshift` by running the following command:
21+
+
22+
[source,terminal]
23+
----
24+
$ oc expose pod hello-microshift -n $namespace
25+
----
26+
27+
. Create an unsecured route to the `hello-microshift` application by running the following command:
28+
+
29+
[source,terminal]
30+
----
31+
$ oc expose svc/hello-microshift --hostname=microshift.com $namespace
32+
----
33+
34+
.Verification
35+
36+
* Verify that the `route` resource was created by running the following command:
37+
+
38+
[source,terminal]
39+
----
40+
$ oc get routes -o yaml <name of resource> -n $namespace <1>
41+
----
42+
<1> In this example, the route is named `hello-microshift` and the namespace is named `hello-microshift`.
43+
44+
.Sample YAML definition of the created unsecured route:
45+
[source,yaml]
46+
----
47+
apiVersion: route.openshift.io/v1
48+
kind: Route
49+
metadata:
50+
name: hello-microshift
51+
namespace: hello-microshift
52+
spec:
53+
host: microshift.com <1>
54+
port:
55+
targetPort: 8080 <2>
56+
to:
57+
kind: Service
58+
name: hello-microshift
59+
----
60+
<1> Example hostname.
61+
<2> `targetPort` is required for the router to map the endpoint port in the service.
62+
+
63+
[NOTE]
64+
====
65+
{microshift-short} does not a use an API that creates a default ingress domain, but instead provides a wildcard for automatically generated domains. Each route can also define a separate hostname.
66+
====

0 commit comments

Comments
 (0)