Skip to content

Commit dbe213b

Browse files
authored
Merge pull request #75318 from EricPonvelle/OSDOCS#8394_Migration-Deploying-Networking
OSDOCS#8394: Migrated the Networking topic for the Deploying your Application docs
2 parents 25c17f5 + 535e37c commit dbe213b

File tree

5 files changed

+64
-0
lines changed

5 files changed

+64
-0
lines changed

_topic_maps/_topic_map_rosa.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ Topics:
186186
File: cloud-experts-deploying-application-prerequisites
187187
- Name: Lab Overview
188188
File: cloud-experts-deploying-application-lab-overview
189+
- Name: Networking
190+
File: cloud-experts-deploying-application-networking
189191
---
190192
Name: Getting started
191193
Dir: rosa_getting_started
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="cloud-experts-deploying-application-networking"]
3+
= Tutorial: Networking
4+
include::_attributes/attributes-openshift-dedicated.adoc[]
5+
:context: cloud-experts-deploying-application-networking
6+
7+
toc::[]
8+
9+
//rosaworkshop.io content metadata
10+
//Brought into ROSA product docs 2023-12-14
11+
12+
This tutorial shows how the OSToy app uses intra-cluster networking to separate functions by using microservices and visualize the scaling of pods.
13+
14+
image::deploying-networking-arch.png[OSToy Diagram]
15+
16+
The diagram shows there are at least two separate pods, each with its own service.
17+
18+
One pod functions as the front end web application with a service and a publicly accessible route. The other pod functions as the backend microservice with a service object so that the front end pod can communicate with the microservice. This communication occurs across the pods if more than one. Because of these communication limits, this microservice is not accessible from outside this cluster or from other namespaces or projects if these are configured. The sole purpose of this microservice is to serve internal web requests and return a JSON object containing the current hostname, which is the pod's name, and a randomly generated color string. This color string is used to display a box with that color displayed in the tile titled "Intra-cluster Communication".
19+
20+
For more information about the networking limitations, see xref:../../networking/openshift_network_security/network_policy/about-network-policy.adoc#about-network-policy[About network policy].
21+
22+
== Intra-cluster networking
23+
24+
You can view your networking configurations in your OSToy application.
25+
26+
.Procedure
27+
. In the OSToy application, click *Networking* in the left menu.
28+
. Review the networking configuration. The right tile titled "Hostname Lookup" illustrates how the service name created for a pod can be used to translate into an internal ClusterIP address.
29+
+
30+
image::deploying-networking-example.png[OSToy Networking page]
31+
32+
. Enter the name of the microservice created in the right tile ("Hostname Lookup") following the format of `<service_name>.<namespace>.svc.cluster.local`. You can find this service name in the service definition of `ostoy-microservice.yaml` by running the following command:
33+
+
34+
[source,terminal]
35+
----
36+
$ oc get service <name_of_service> -o yaml
37+
----
38+
+
39+
.Example output
40+
[source,yaml]
41+
----
42+
apiVersion: v1
43+
kind: Service
44+
metadata:
45+
name: ostoy-microservice-svc
46+
labels:
47+
app: ostoy-microservice
48+
spec:
49+
type: ClusterIP
50+
ports:
51+
- port: 8080
52+
targetPort: 8080
53+
protocol: TCP
54+
selector:
55+
app: ostoy-microservice
56+
----
57+
+
58+
In this example, the full hostname is `ostoy-microservice-svc.ostoy.svc.cluster.local`.
59+
60+
. You see an IP address returned. In this example it is `172.30.165.246`. This is the intra-cluster IP address, which is only accessible from within the cluster.
61+
+
62+
image::deploying-networking-dns.png[OSToy DNS]

images/deploying-networking-arch.png

58.2 KB
Loading

images/deploying-networking-dns.png

37.7 KB
Loading
125 KB
Loading

0 commit comments

Comments
 (0)