Welcome to the Linux Foundation Forum!

Lab 3.4 - unable to access nginx from outside the cluster

Hi,
I followed the steps in the lab to expose the service and access it from outside but I am unable to access. I can access the service from inside the node(with public ip and private ip both). I tried the same scenario in AWS and Google cloud. Both the cases it is still not accessible from outside. I double checked the GCP firewalls and aws security groups(opened up all the ports). Posted a question in stackoverflow too. Need help on where/how to debug?

https://stackoverflow.com/questions/52226295/aws-kubernetes-exposed-service-timeout-error

Answers

  • could it be due to any OS level firewalls? if it might any help is appreciated on 'how to debug'. I have a cluster active in GCP and AWS both.

  • serewicz
    serewicz Posts: 1,000

    Hello M. Sivanantham,

    Yes, chances are it is your firewall. The easiest way to narrow down the issue it to allow all access, to every port. If you can then gain access you would know it's a firewall issue.

    If you use the public facing IP of your node and the high port number and the curl works, this would be a strong indication that the node-level or provider-level firewall is at issue.

    Another option is to leave wireshark running and filter for the particular high port. You would see, or not see, requests coming through the public facing interface and be able to determine if the packet was at least making it to the node.

    Having run the labs in both GCE and AWS I think you'll find its the cloud firewall. Opening all ports to your network will probably work.

    Regards,

  • @serewicz said:
    Hello M. Sivanantham,

    Yes, chances are it is your firewall. The easiest way to narrow down the issue it to allow all access, to every port. If you can then gain access you would know it's a firewall issue.

    If you use the public facing IP of your node and the high port number and the curl works, this would be a strong indication that the node-level or provider-level firewall is at issue.

    Another option is to leave wireshark running and filter for the particular high port. You would see, or not see, requests coming through the public facing interface and be able to determine if the packet was at least making it to the node.

    Having run the labs in both GCE and AWS I think you'll find its the cloud firewall. Opening all ports to your network will probably work.

    Regards,

    Hi serewicz,
    Thanks for your quick reply. I confirmed it is not a firewall issue. I already opened up all the ports. Also, I deleted the k8s service and spin up a simple python server on the same port that kubernetes service exposed(port no 31xxx). I was able to access that python server through http from external machine. It’s the same port that was linked by k8s service. I am completely lost on this. I will try wireshark and see if I get any lead.

  • Hi,
    I encountered similar issues due to cloud provider firewall settings. Either at VPC level, or SGs, or VM level. Usually the OS firewall was installed in disabled state. When I enabled all traffic in the cloud provider's firewall and opened all ports I was able to successfully complete the labs.
    Regards,
    -Chris

  • serewicz
    serewicz Posts: 1,000

    Do you have a Google Compute Engine VPC firewall rule which allows all traffic, on all ports to all instances?

  • serewicz
    serewicz Posts: 1,000

    It would look something like this in AWS:

  • Finally Figured this. Thanks serewicz. The internet firewall on my network was blocking the access to specific ports. There was no issues with the Cloud Provider Firewall or Instance Firewall. My corporate proxy was blocking connections going to specific port.

    When i ran a python server - i used a different port. But i though i ran in the same port where kubernetes service was running.

  • serewicz
    serewicz Posts: 1,000

    Great! Glad to hear you found where the firewall was.

    Regards,

Categories

Upcoming Training