cancel
Showing results for 
Search instead for 
Did you mean: 
  • 83 Views

Referencing a deployment for network access, by its name, on a pod outside of it

Hi, on chapter ch05s04 of DO180, "Guided Exercise: Provision Persistent Data Volumes", an ephemeral 'query-db' pod is querying a database inside a 'db-pod' deployment, referencing it by name in the '-h db-pod' parameter. Isn't that unreliable? Or can I trust that the network name will always be the same name of the deployment, for pods outside of it?

[student@workstation ~]$ oc create deployment db-pod \
--port 3306 \
--image registry.ocp4.example.com:8443/rhel8/mysql-80
deployment.apps/db-pod created

[student@workstation ~]$ oc run query-db -it --rm --image \
registry.ocp4.example.com:8443/redhattraining/do180-dbinit \
--restart Never \
-- /bin/bash -c "mysql -uuser1 -predhat123 --protocol tcp \
-h db-pod -P3306 items -e 'select * from Item;'"

Thanks!

0 Kudos
1 Reply
TudorRaduta
Community Manager
Community Manager
  • 11 Views

@LuisDerani unfortunately, your post was accidentally caught by the spam filter, and I had to pull it out -apologies for that!

If the lab issue is unresolved, I’d recommend opening a support case so the team can check your lab directly and help fix the issue. Also, If you have an RHLS Standard or Premium subscription, you can also start a live Expert Chat with one of our course specialists (available 24x5).

0 Kudos
Join the discussion
You must log in to join this conversation.