Welcome to the Linux Foundation Forum!

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 for IPV4


  • 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.

  • followup2: The same thing happens when we add a service to the mix: only works from the worker node, not the cp node.

  • chrispokorni
    chrispokorni Posts: 1,552
    edited September 2021

    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.



Upcoming Training