Skip to content

Commit 8e93b43

Browse files
committed
ingress and route
1 parent 6413bbc commit 8e93b43

1 file changed

Lines changed: 18 additions & 7 deletions

File tree

documentation/modules/ROOT/pages/service.adoc

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,18 @@ Supersonic Subatomic Java with Quarkus quarkus-demo-deployment-5979886fb7-grf59:
119119

120120
NOTE: "5979886fb7-grf59" is part of the unique id for the pod. The `.java` code uses `System.getenv().getOrDefault("HOSTNAME", "unknown");`
121121

122-
== Ingress
122+
== Ingress or Route
123+
124+
*Kubernetes Ingress* and *OpenShift Route* are functionally similar, resources used to expose applications externally.
125+
126+
The `Route` object was developed by Red Hat before the Kubernetes Ingress API was fully mature. It essentially bundles the traffic rule definition and its implementation (via the built-in HAProxy Router) into a single, opinionated feature.
127+
128+
Depending on your underlying platform, continue with the relevant path:
129+
130+
. <<#_kubernetes_ingress,Kubernetes Ingress>>
131+
. <<#_openshift_route,OpenShift Route>>
132+
133+
=== Kubernetes Ingress
123134

124135
[#create-ingress]
125136
[.console-input]
@@ -160,9 +171,7 @@ Supersonic Subatomic Java with Quarkus quarkus-demo-deployment-5979886fb7-gdtnz:
160171

161172
In case of using Minikube follow: https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/
162173

163-
== OpenShift Route
164-
165-
Delete the manually created Ingress to avoid any naming collisions. An OpenShift Route leverages ha-proxy for its default Ingress.
174+
Remove the ingress:
166175

167176
[#delete-ingress]
168177
[.console-input]
@@ -171,12 +180,14 @@ Delete the manually created Ingress to avoid any naming collisions. An OpenShif
171180
kubectl delete ingress myingress
172181
----
173182

183+
=== OpenShift Route
184+
174185
[#expose-service]
175186
[.console-input]
176187
[source,bash,subs="+macros,+attributes"]
177188
----
178189
oc expose service the-service
179-
kubectl get routes
190+
oc get routes
180191
----
181192

182193
[.console-output]
@@ -208,7 +219,7 @@ The following command dumps the Kubernetes object to a file in JSON format:
208219
[.console-input]
209220
[source,bash]
210221
----
211-
kubectl get route the-service -o json > myroutes.json
222+
oc get route the-service -o json > myroutes.json
212223
----
213224

214225
It's also possible to extract specific information from the JSON using JSONPath syntax.
@@ -217,7 +228,7 @@ It's also possible to extract specific information from the JSON using JSONPath
217228
[.console-input]
218229
[source, bash]
219230
----
220-
kubectl get route the-service -o jsonpath="{.spec.host}"
231+
oc get route the-service -o jsonpath="{.spec.host}"
221232
----
222233

223234
[.console-output]

0 commit comments

Comments
 (0)