Welcome to the Linux Foundation Forum!

lab 3.4 - why?

How do we get that log output on step 4? When I do curl, all i get is the html/default page of the web server. Also what is the point of making sure the web server listens on port 80? I put
containerPort: 80
in the yaml file but it did not make a diference. The html page shows whether or not this is there.


  • Hi @ashdev,

    If you revisit "Chapter 3 - Build", you will find an example of how to display the logs of a container running in a pod.

    Also, revisit the probes and understand their role in monitoring containers' health. What is the expected behavior of a healthy webserver container, with respect to its port(s)? What about an unhealthy webserver container?


  • ashdev
    ashdev Posts: 15
    edited September 2020

    @chrispokorni the closest I could find to the logging was number 6 and 7 on this file:
    But wont that mean I have to start configuring a docker compose?

  • Hello,

    In on the page 03. Build -> Build -> Testing , do you find any commands that would show the logs of the container?

    When you use that command after viewing the default page of an pod running nginx, do you see an entry similar to - - [03/Sep/2020:19:50:38 +0000] "GET / HTTP/1.1" 200 612 "-" "curl/7.58.0" "-"


  • @serewicz I have done it! Thank you so much. But can you expand on how we are supposed to make sure the web server listens on port 80? I don't get that part because the html file of the server is given to us whether there is a port specified in the yaml file or not. What was the point of that instruction?

  • Hello,

    Indeed any container listening on would see the http request on port 80. Some of the reason is historical, where it was a requirement, and now is more informational. Here is the API spec:

    Container Port

    Could there be other reasons to know and add this information, sure. For example if you add targetPort you can could change the port the traffic is sent to.



Upcoming Training