Lab 2.3. curl to basic pod fails.
Hi - my name is Friedrich and I am new to the course.
I have setup a k8s cluster by following Lab 2.1 and Lab 2.2, and can connect to the cluster with kubectl. The worker node has been joined to the cluster too.
I deploy the basic.yaml pod, and kubectl get po shows it is running nginx. Shelling into nginx and doing wget localhost returns html, so nginx is working.
When I do the curl http://[ip-returned-by-kubectl-get-po], it just hangs.
Am I doing something wrong? I'm running on AWS, but running the commands on the cp node via ssh. The network is open to 0.0.0.0/0 for IPV4
Answers
-
follow-up: Did some more testing. The pod seems to be running on the worker node. If I ssh to the worker node, the curl works fine and returns the html contents. The same command does not work on the cp node.
0 -
followup2: The same thing happens when we add a service to the mix: only works from the worker node, not the cp node.
0 -
Hi @brunzefb,
What you are experiencing is typically the result of a networking misconfiguration.
Since you are on AWS, are you using the default VPC or have you created a custom one? The default VPC may be blocking some ports by default.
Is your SG allowing all inbound/ingress traffic from all sources, all protocols, to all ports? Are both your EC2 VMs placed in the same SG?
EDIT: You may find additional helpful tips and solutions in prior discussions posted in the forum on the same topic.
Regards,
-Chris1 -
I am a little late here but I had the same problem.
@chrispokorni comment got me thinking there was something broken in my VCN (same thing as VPC except for Oracle Cloud Infrastructure).Make sure to enable IP-to-IP in your ingress rules.
CIDR block 10.0.0.0/29 IP-in-IP Calico networking with IP-in-IP enabled CIDR block 10.0.64.0/20 IP-in-IP Calico networking with IP-in-IP enabled
0 -
I utilize my Docker Desktop's default cluster for the lab and the way to successfully make a curl command to the pod is to utilize port-forwarding. Run this command in one terminal
kubectl port-forward pod/basicpod 18080:80and from another you can run the curl commandcurl http://localhost:18080.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
- 976 Programming and Development
- 310 Kernel Development
- 648 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)