Kubernetes Networking / Service: Node Port

  Рет қаралды 21,651

kubetrain

kubetrain

Күн бұрын

Пікірлер: 45
@sharriavenger
@sharriavenger 3 жыл бұрын
Thanks for the Firewall rule point, literally saved my day!
@oscarllamas
@oscarllamas 3 жыл бұрын
Same here :D
@ghoshsuman9495
@ghoshsuman9495 6 ай бұрын
@@oscarllamas instead of go inside pod can we go inside cluster ?
@pritam2k
@pritam2k 2 жыл бұрын
You saved my day!! I was so frustrated as why it was not working!
@amey0077
@amey0077 Жыл бұрын
thanks for that firewall part much needed
@cloudtech273
@cloudtech273 Жыл бұрын
If we have 4 nodes but my app is deployed to only 2 of the nodes, will NodePort service direct request to the 2 on which the app is deployed ?
@ghoshsuman9495
@ghoshsuman9495 6 ай бұрын
instead of go inside pod can we go inside cluster ?
@vikaschauhan3290
@vikaschauhan3290 Жыл бұрын
I have installed a minikube and simply run the same yml file for service with Nodeport as same as you. My issue is when I curl my container using Nodeip:nodeport it is accessible but I am unable to access the container by using the public DNS of ec2:Nodeport and also curl podIP:Nodeport it showing nothing. Also showing nothing curl podIP:80.
@kubetrain
@kubetrain Жыл бұрын
Is your public dns resolving directly to the node ip that worked… secondly pod ip and node port combination wont work, it only works with node ip
@vikaschauhan3290
@vikaschauhan3290 Жыл бұрын
@@kubetrain what is the process to check the public dns directly resolve the node ip or how can i access the container publicly i am using ec2 instance and i have installed the minikube
@VISHNUVardhan-mr2cq
@VISHNUVardhan-mr2cq 2 жыл бұрын
I have deployed a service on kubernetes , I am querying the service using : from outside and inside ( tried with both ) I am getting no response.(says connection refused ) Is is because of the protocol difference between curl and the server that I have deployed or? Is there any other reason?
@kubetrain
@kubetrain 2 жыл бұрын
Any firewall block?
@m4uvarathan
@m4uvarathan 5 ай бұрын
Hi , I want to create a single pod use to run multiple container as different apps and those all could be access from external or internal IP's , how can we achieve the requirements , please guide me.
@kubetrain
@kubetrain 4 ай бұрын
I think we can use one service with different target ports one for each container and keep the service as load balancer or point from an ingress to cluster ip service… may be you already completed this…
@m4uvarathan
@m4uvarathan 4 ай бұрын
Thanks for your suggestion, if you have yaml file pls share so I'll do practical and let you know the result
@kubetrain
@kubetrain 4 ай бұрын
Didn’t try this scenario actually
@ThanhNguyenVan-ss7yy
@ThanhNguyenVan-ss7yy 2 жыл бұрын
hi, your video is so great! One question from me that why in type nodeport use access to app using the random port creating by k8s whereas in Load balancer we dont excess it via the random port instead using definition port?
@kubetrain
@kubetrain 2 жыл бұрын
Thx, we can also provide fixed port to nodeport but it causes conflict when two services have the same port coz the node ip could be same, where as with loadbalancer the ip itself is different hence no conflict. It’s recommended to go with random port for nodeport as k8s takes the overhead of assigning unique ports and we don’t have to maintain the list separately
@amitjain8858
@amitjain8858 Жыл бұрын
@@kubetrain Thanks for your video, I have a question , if we are getting some random port then what is the use Nodeport 8080 , and is there any way that we can access the application via NodePort 8080
@kubetrain
@kubetrain Жыл бұрын
Nodeport has a default range 30000-32767, for 8080 you can better use cluster ip or load balancer
@gururajraykar9254
@gururajraykar9254 3 жыл бұрын
Hi, In my case i did the firewall setting as you have shown in the video but still curl command is not responding anything.. Any other settings i am missing here?
@kubetrain
@kubetrain 3 жыл бұрын
You are curling from?
@kubetrain
@kubetrain 3 жыл бұрын
Is there Network connectivity from where you are pinging to the destination
@gururajraykar9254
@gururajraykar9254 3 жыл бұрын
I am running curl command in cloud shell and when I run curl for localhost after doing the port forwarding works fine. But after running the curl for external IP or cluster ip not seeing any results.
@kubetrain
@kubetrain 3 жыл бұрын
Bu saying External IP do you refer to the public IP of one of the nodes?, if so it could be due to something w.r.t the access control or security groups.
@gururajraykar9254
@gururajraykar9254 3 жыл бұрын
Yes even I am thinking same. Thank you for responses
@tonycavanagh1929
@tonycavanagh1929 2 жыл бұрын
Your kubectl get node -o wide shows External-IP as well as Internal-IP , when I run it on my service I only get Internal-IP. I want to access this node IP from my localhost. Is there something I need to set. So that both extermal as well as internal IPs are exposed.
@kubetrain
@kubetrain 2 жыл бұрын
If it’s a public cluster on the cloud the nodes would already have public IPs
@tonycavanagh1929
@tonycavanagh1929 2 жыл бұрын
@@kubetrain Its just a local I set up for research. Cheers so that is why. So I cant access the nodes from my locl. unless I host it as public on the cloud. Thanks
@mediatwinkleTV
@mediatwinkleTV 3 жыл бұрын
Ha, that firewall issue can be nerve racking. LOL, so how do we curl internal IP ??
@kubetrain
@kubetrain 3 жыл бұрын
From a node or pod in the cluster
@Deshammanideep
@Deshammanideep Жыл бұрын
Suppose each node has two replicas of same pod. If we use the ip of node and port number then request goes to which pod ?
@kubetrain
@kubetrain Жыл бұрын
I think it should go to one of the pods in the service, the flow should be nodePort > ClusterIP > pod(s)
@Deshammanideep
@Deshammanideep Жыл бұрын
@@kubetrain Thanks for the clarification.
@gerarduab9960
@gerarduab9960 3 жыл бұрын
You do curl internal node 10.128.0.45: 31468 but what if you are in other pod that don't are in the same node. It reloves the ip from another node?
@kubetrain
@kubetrain 3 жыл бұрын
Should work as long as there is connectivity between the pod and node
@UnknownSend3r
@UnknownSend3r 2 жыл бұрын
@@kubetrain while inside the pod could you have curled with nodeIP:nodePort like you did *and* used clusterIP:8080 ?
@kubetrain
@kubetrain 2 жыл бұрын
Depends on the image, if the container image has curl it would work
@ratikeshpathak198
@ratikeshpathak198 2 жыл бұрын
HI @ kubetrain Can you please tell me from where can I get config file of services like cluster IP , node port, load balancer
@kubetrain
@kubetrain 2 жыл бұрын
R u looking for sample manifests?
@sribalaje
@sribalaje Жыл бұрын
I tried to login to one of the pod and curled nodeip:port number but no luck..Connection refused.. Can you please help.
@kubetrain
@kubetrain Жыл бұрын
Did you try with nodeport as the port number? Are you trying to access the private IP or public IP of the node. Is the firewall rule setup for allowing access to the nodeport range.
@sribalaje
@sribalaje Жыл бұрын
@@kubetrain Thanks for your response. I am trying to access the Node IP which is private. Yes Firewall has been setup. I am able to access via Public IP:30000.
@karteeshv
@karteeshv Жыл бұрын
999th Subscriber 🎉
Kubernetes Networking / Service : Load Balancer
6:28
kubetrain
Рет қаралды 23 М.
How it feels when u walk through first class
00:52
Adam W
Рет қаралды 20 МЛН
Кәсіпқой бокс | Жәнібек Әлімханұлы - Андрей Михайлович
48:57
Kubernetes Network Policies Explained
19:02
DevOps Toolkit
Рет қаралды 13 М.
RBAC in Kubernetes
20:27
Pavan Elthepu
Рет қаралды 35 М.
Kubernetes NodePort vs LoadBalancer vs Ingress
6:27
Anton Putra
Рет қаралды 75 М.
Kubernetes Backup and Restore
15:06
kubetrain
Рет қаралды 9 М.