Welcome to the Linux Foundation Forum!

Hi, All im new to kubernetes and preparing for the CKA.

khemnathch Posts: 1
edited December 2018 in LFS258 Class Forum

Currently, I have setup kubenetes environment using VMs in local machine. 1 master and 2 worker nodes.
Now I have deployed sample application nginx on both nodes.
I have created service to access this application. I can access in one of the node and unable to acces application on another node.

-- Deployed App
kubectl create deployment nginx --image=nginx
--CREATE Service
kubectl create service nodeport nginx --tcp=80:80

root@kube-master:~# kubectl get svc
kubernetes ClusterIP 443/TCP 41h
nginx NodePort 80:31722/TCP 40h

now, accessing app on node1 works fine.

below doesn't work (node02)

Kindly, advise if any configuration/Setting is missing


  • serewicz
    serewicz Posts: 1,000


    The firewall rules which add the nodeport should have been created on every node, so every node should be able to execute the curl and have it work. Calico works with other agents to get these rules configured. So I would make sure that Calico is properly running. To help troubleshoot, here are some questions:

    Are all the pods running without error? kubectl get pods --all-namespaces
    Are all of the nodes fully joined? kubectl get nodes
    If you use wireshark or tcpdump on the node with issue are you seeing the curl request being made via the interface?
    Is there a chance that the firewall settings on the second worker are different than the first?


  • @khemnathch
    Running on local VMs has its challenges, especially when it comes to configuring the VMs to be able to talk to each other and to the outside world at the same time.
    When I worked with local VMs I tested the communication between them to make sure they were able to talk to one another in both directions, before I setup my kubernetes cluster.


Upcoming Training