Welcome to the Linux Foundation Forum!

Lab 3.5 - pt 6. Viewing webpage.

following Lab 3.5 pt 6, If I run
kubectl expose deployment nginx --type=LoadBalancer

I can curl the new IP + port 80, but the task is to view the nginx page svc IP + port# from a browser, and that is not working for me.

I have no firewalls or anything blocking comms, if anything it would be a subnet issue.

  • Running TCP dump from worker node in previous Lab was fine. So between VM's I'm good.
  • Local to VM's over 192.168.0.X subnet is fine because I can SSH into the VMs.
  • Kubernetes to Local I think maybe the issue.

My nginx svc IP is : 10.108.192.92:32753

Local PC: 192.168.0.x/24

VM's: 192.168.0.x/24
Docker: 172.17.X.X/16 (docker0)
Calico Config:
- name: CALICO_IPV4POOL_CIDR
value: "10.0.0.0/16"

Comments

  • serewicz
    serewicz Posts: 947

    Hello,

    The issue is most likely due to Docker networking. Which node does the pod run upon? Does the curl to the service work when you are on that node?

    As this works when using GCE, AWS, Digital Ocean, VirtualBox, KVM/QEMU, and VMWare VMs chances are its due to you using Docker which inserts its own networking.

    Regards,

  • chrispokorni
    chrispokorni Posts: 1,169

    Hi @PeterCharuza,

    Keep in mind that in the browser you are expected to use the node IP with the NodePort, not the service ClusterIP with the NodePort.

    The purpose of curl ifconfig.io is to extract the node IP.

    Regards,
    -Chris

  • PeterCharuza
    PeterCharuza Posts: 22
    edited September 13

    YESSSS that was the ticket @chrispokorni !
    I can't believe I didn't try that before,

    My master node IP + port#, http://192.168.0.156:32056/ works from my local PC browser to show the NGINX default page.

    Thanks all for your help, :smile:

Categories

Upcoming Training