cancel
Showing results for 
Search instead for 
Did you mean: 
DavidDiaz
Cadet
Cadet
  • 112 Views

Port number in deployment creation

Jump to solution

Hello.

If the port number is not specified in the exercise, how do we know the port number we should put in "oc create deployment"?... in the exam should we always put the standard port number for each service?

For example, in point 8.1 of "5.6. Guided Exercise: Select a Storage Class for an Application" the command "oc create deployment" has "--port 8080":

 

Use the registry.ocp4.example.com:8443/ubi9/httpd-24:1-321 container image to create a web application deployment named web-pod.

Create the web-pod deployment.

[student@workstation ~]$ oc create deployment web-pod --port 8080 \
--image registry.ocp4.example.com:8443/ubi9/httpd-24:1-321
deployment.apps/web-pod created


Thank you very much in advance.

Best regards.

 

Labels (2)
Tags (3)
1 Solution

Accepted Solutions
Travis
Moderator
Moderator
  • 99 Views

@DavidDiaz -

As a reminder, we can't discuss exam questions or actual contents of an exam, but if you discard "what to do for an exam" you question really becomes, the course has guided exercises and it tells me what to put in when we create deployments, but how do we know what ports are available in a container image and how to use them?

Each container image has metadata assigned to them and using things like Podman or Skopeo you can inspect container images. So if information isn't provided about an image and what is available, the image must be "inspected" to retrieve that type of information. A lot of times, when you are getting images from registries like Dockerhub or other locations it will also tell you what ports are available and how to "expose" these ports.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training

View solution in original post

1 Reply
Travis
Moderator
Moderator
  • 100 Views

@DavidDiaz -

As a reminder, we can't discuss exam questions or actual contents of an exam, but if you discard "what to do for an exam" you question really becomes, the course has guided exercises and it tells me what to put in when we create deployments, but how do we know what ports are available in a container image and how to use them?

Each container image has metadata assigned to them and using things like Podman or Skopeo you can inspect container images. So if information isn't provided about an image and what is available, the image must be "inspected" to retrieve that type of information. A lot of times, when you are getting images from registries like Dockerhub or other locations it will also tell you what ports are available and how to "expose" these ports.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
Join the discussion
You must log in to join this conversation.