1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/learning-deploying-application-networking-intraculter-networking.adoc

48 lines
1.6 KiB
Plaintext

// Module included in the following assemblies:
//
// * rosa_learning/deploying_application_workshop/learning-deploying-application-networking.adoc
:_mod-docs-content-type: PROCEDURE
[id="learning-deploying-application-networking-intraculter-networking_{context}"]
= Configuring intra-cluster networking
[role="_abstract"]
You can view your networking configurations in your OSToy application.
.Procedure
. In the OSToy application web console, click *Networking* in the left menu.
. Review the networking configuration. The tile "Hostname Lookup" illustrates how the service name created for a pod translates into an internal ClusterIP address.
+
image::deploying-networking-example.png[OSToy Networking page]
. Enter the name of the microservice created in the "Hostname Lookup" tile following the format: `<service_name>.<namespace>.svc.cluster.local`. You can find the microservice name in the service definition of `ostoy-microservice.yaml` by running the following command:
+
[source,terminal]
----
$ oc get service <name_of_service> -o yaml
----
+
*For example*:
+
[source,yaml]
----
apiVersion: v1
kind: Service
metadata:
name: ostoy-microservice-svc
labels:
app: ostoy-microservice
spec:
type: ClusterIP
ports:
- port: 8080
targetPort: 8080
protocol: TCP
selector:
app: ostoy-microservice
----
+
In this example, the full hostname is `ostoy-microservice-svc.ostoy.svc.cluster.local`.
. An IP address is 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.
+
image::deploying-networking-dns.png[OSToy DNS]