Lab 3.4. Domain Review
Hi, i am new to kubernetes and trying to get a hang of it. Not sure what is really expected from this exercise (Lab 3.4. Domain Review):
- Use the build-review1.yaml file to create a non-working deployment. Fix the deployment such that both containers are running and in a READY state. The web server listens on port 80, and the proxy listens on port 8080.
- View the default page of the web server. When successful verify theGETactivity logs in the container log. The messageshould look something like the following. Your time and IP may be different.
- 192.168.124.0 - - [30/Jan/2020:03:30:31 +0000] "GET / HTTP/1.1" 200 612 "-" "curl/7.58.0" "-"
I am able to make both the pods running and ready by just changing the port to 8080 under the liveness and readiness probes as mentioned in build-review1.yaml file. Also i added port section for nginx container on 80 as mentioned above.
But in logs for both the containers i don't see the below line (its empty logs)
192.168.124.0 - - [30/Jan/2020:03:30:31 +0000] "GET / HTTP/1.1" 200 612 "-" "curl/7.58.0" "-"
not sure what is expected from this exercise? I understand ip will be different but i don't see anything for both container logs.
Thanks
Rishu
Comments
-
Hi Tim, the missing part was i didn't try to curl to the nginx server and was checking the logs directly. i did curl -vk http://<
>:<> from the master node and after this i can see the logs getting updated..
thanks
Rishu0 -
where did you see the logs? @Rishu1977 All i saw the html for the nginx
0 -
Hi @ashdev,
You can revisit "Chapter 3 - Build" for an example on how to display container logs.
Regards,
-Chris1 -
Hi, I keep reading "chapter 3 - Build" but couldnt find how to display and configure logs...
0 -
Hi @zite,
You can find
kubectl logscommand usage examples on the Testing page in Chapter 3.Regards,
-Chris0 -
Hi, sorry if I'm wrong, but using LFD259-labs_V2023-05-31.pdf document, and cannot find 'kubectl logs' command on chapter 3. I can see the first occurrence of this command on chapter 5
0 -
Ok, I managed to get the logs
0 -
This is what I did.
ubuntu@cp:~/LFD259/MY_SOLUTIONS/s_03$ kubectl get pods -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES break2-7df45c9687-5g7sm 2/2 Running 0 12m 10.0.1.115 worker <none> <none> nginx-7b8bd4f85d-fg6f7 1/1 Running 1 (90m ago) 100m 10.0.1.35 worker <none> <none> registry-8596585bb9-nvqc4 1/1 Running 1 (90m ago) 100m 10.0.1.15 worker <none> <none>
curl my pod a few times
curl 10.0.1.115
ubuntu@cp:~/LFD259/MY_SOLUTIONS/s_03$ kubectl logs break2-7df45c9687-5g7sm Defaulted container "brokenapp" out of: brokenapp, goproxy /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/ /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf 10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf /docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh /docker-entrypoint.sh: Configuration complete; ready for start up 2025/04/16 14:28:10 [notice] 1#1: using the "epoll" event method 2025/04/16 14:28:10 [notice] 1#1: nginx/1.27.4 2025/04/16 14:28:10 [notice] 1#1: built by gcc 12.2.0 (Debian 12.2.0-14) 2025/04/16 14:28:10 [notice] 1#1: OS: Linux 6.8.0-1026-aws 2025/04/16 14:28:10 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576 2025/04/16 14:28:10 [notice] 1#1: start worker processes 2025/04/16 14:28:10 [notice] 1#1: start worker process 30 2025/04/16 14:28:10 [notice] 1#1: start worker process 31 10.0.0.219 - - [16/Apr/2025:14:29:55 +0000] "GET / HTTP/1.1" 200 615 "-" "curl/8.5.0" "-" 10.0.0.219 - - [16/Apr/2025:14:35:05 +0000] "GET / HTTP/1.1" 200 615 "-" "curl/8.5.0" "-" 10.0.0.219 - - [16/Apr/2025:14:35:06 +0000] "GET / HTTP/1.1" 200 615 "-" "curl/8.5.0" "-" 10.0.0.219 - - [16/Apr/2025:14:35:06 +0000] "GET / HTTP/1.1" 200 615 "-" "curl/8.5.0" "-" 10.0.0.219 - - [16/Apr/2025:14:39:11 +0000] "GET / HTTP/1.1" 200 615 "-" "curl/8.5.0" "-" 10.0.0.219 - - [16/Apr/2025:14:39:11 +0000] "GET / HTTP/1.1" 200 615 "-" "curl/8.5.0" "-" 10.0.0.219 - - [16/Apr/2025:14:39:12 +0000] "GET / HTTP/1.1" 200 615 "-" "curl/8.5.0" "-"
0
Categories
- All Categories
- 177 LFX Mentorship
- 177 LFX Mentorship: Linux Kernel
- 754 Linux Foundation IT Professional Programs
- 374 Cloud Engineer IT Professional Program
- 170 Advanced Cloud Engineer IT Professional Program
- 74 DevOps IT Professional Program - Discontinued
- 5 DevOps & GitOps IT Professional Program
- 100 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- 2 AI & ML Training
- 1 Blockchain & Decentralized Identity Training
- 5 Cloud & Containers Training
- 1 Cybersecurity Training
- 2 DevOps & Site-Reliability Training
- 1 Linux Kernel Development Training
- 1 Networking Training
- 2 Open Source Best Practice Training
- 2 System Administration Training
- 1 System Engineering Training
- 1 Web & Application Development Training
- 794 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 89 Storage
- 769 Linux Distributions
- 81 Debian
- 68 Fedora
- 22 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 112 Mobile Computing
- 20 Android
- 77 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 393 Off Topic
- 121 Introductions
- 182 Small Talk
- 29 Study Material
- 977 Programming and Development
- 310 Kernel Development
- 649 Software Development
- 990 Software
- 382 Applications
- 182 Command Line
- 5 Compiling/Installing
- 68 Games
- 317 Installation
- Archived
- 2 LFD140 Class Forum
- 1.4K LFS258 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)