Welcome to the Linux Foundation Forum!

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

khemnathch
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
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 443/TCP 41h
nginx NodePort 10.100.111.105 80:31722/TCP 40h

now, accessing app on node1 works fine.
curl 192.168.1.9:31722

below doesn't work (node02)
curl 192.168.1.10:31722

Kindly, advise if any configuration/Setting is missing

Comments

  • @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.
    Regards,
    -Chris

Categories

Upcoming Training