You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/modules/ROOT/pages/service.adoc
+18-7Lines changed: 18 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,7 +119,18 @@ Supersonic Subatomic Java with Quarkus quarkus-demo-deployment-5979886fb7-grf59:
119
119
120
120
NOTE: "5979886fb7-grf59" is part of the unique id for the pod. The `.java` code uses `System.getenv().getOrDefault("HOSTNAME", "unknown");`
121
121
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
123
134
124
135
[#create-ingress]
125
136
[.console-input]
@@ -160,9 +171,7 @@ Supersonic Subatomic Java with Quarkus quarkus-demo-deployment-5979886fb7-gdtnz:
160
171
161
172
In case of using Minikube follow: https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/
162
173
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:
166
175
167
176
[#delete-ingress]
168
177
[.console-input]
@@ -171,12 +180,14 @@ Delete the manually created Ingress to avoid any naming collisions. An OpenShif
171
180
kubectl delete ingress myingress
172
181
----
173
182
183
+
=== OpenShift Route
184
+
174
185
[#expose-service]
175
186
[.console-input]
176
187
[source,bash,subs="+macros,+attributes"]
177
188
----
178
189
oc expose service the-service
179
-
kubectl get routes
190
+
oc get routes
180
191
----
181
192
182
193
[.console-output]
@@ -208,7 +219,7 @@ The following command dumps the Kubernetes object to a file in JSON format:
208
219
[.console-input]
209
220
[source,bash]
210
221
----
211
-
kubectl get route the-service -o json > myroutes.json
222
+
oc get route the-service -o json > myroutes.json
212
223
----
213
224
214
225
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
217
228
[.console-input]
218
229
[source, bash]
219
230
----
220
-
kubectl get route the-service -o jsonpath="{.spec.host}"
231
+
oc get route the-service -o jsonpath="{.spec.host}"
0 commit comments