mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 21:46:22 +01:00
33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * cli_reference/openshift_developer_cli/creating-a-multicomponent-application-with-odo.adoc
|
|
[id="linking-both-components_{context}"]
|
|
|
|
= Linking both components
|
|
|
|
Components running on the cluster need to be connected in order to interact. {product-title} provides linking mechanisms to publish communication bindings from a program to its clients.
|
|
|
|
.Procedure
|
|
|
|
. List all the components that are running on the cluster:
|
|
+
|
|
----
|
|
$ odo list
|
|
APP NAME TYPE SOURCE STATE
|
|
app backend openjdk18 file://target/wildwest-1.0.jar Pushed
|
|
app frontend nodejs file://./ Pushed
|
|
----
|
|
|
|
|
|
. Link the current front-end component to the backend:
|
|
+
|
|
----
|
|
$ odo link backend --port 8080
|
|
✓ Component backend has been successfully linked from the component frontend
|
|
|
|
Following environment variables were added to frontend component:
|
|
- COMPONENT_BACKEND_HOST
|
|
- COMPONENT_BACKEND_PORT
|
|
----
|
|
+
|
|
The configuration information of the back-end component is added to the front-end component and the front-end component restarts. |