Kubernetes Networking / Service: Node Port

  Рет қаралды 22,353

kubetrain

kubetrain

Күн бұрын

Пікірлер: 45
@sharriavenger
@sharriavenger 4 жыл бұрын
Thanks for the Firewall rule point, literally saved my day!
@oscarllamas
@oscarllamas 3 жыл бұрын
Same here :D
@ghoshsuman9495
@ghoshsuman9495 9 ай бұрын
@@oscarllamas instead of go inside pod can we go inside cluster ?
@pritam2k
@pritam2k 3 жыл бұрын
You saved my day!! I was so frustrated as why it was not working!
@amey0077
@amey0077 Жыл бұрын
thanks for that firewall part much needed
@ghoshsuman9495
@ghoshsuman9495 9 ай бұрын
instead of go inside pod can we go inside cluster ?
@cloudtech273
@cloudtech273 2 жыл бұрын
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 ?
@karteeshv
@karteeshv Жыл бұрын
999th Subscriber 🎉
@m4uvarathan
@m4uvarathan 8 ай бұрын
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 8 ай бұрын
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 8 ай бұрын
Thanks for your suggestion, if you have yaml file pls share so I'll do practical and let you know the result
@kubetrain
@kubetrain 8 ай бұрын
Didn’t try this scenario actually
@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
@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
@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
@Deshammanideep
@Deshammanideep 2 жыл бұрын
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 2 жыл бұрын
I think it should go to one of the pods in the service, the flow should be nodePort > ClusterIP > pod(s)
@Deshammanideep
@Deshammanideep 2 жыл бұрын
@@kubetrain Thanks for the clarification.
@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
@gerarduab9960
@gerarduab9960 4 жыл бұрын
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 4 жыл бұрын
Should work as long as there is connectivity between the pod and node
@UnknownSend3r
@UnknownSend3r 3 жыл бұрын
@@kubetrain while inside the pod could you have curled with nodeIP:nodePort like you did *and* used clusterIP:8080 ?
@kubetrain
@kubetrain 3 жыл бұрын
Depends on the image, if the container image has curl it would work
@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
@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?
@sribalaje
@sribalaje 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
@@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.
@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?
Kubernetes Networking / Service : Load Balancer
6:28
kubetrain
Рет қаралды 24 М.
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
RBAC in Kubernetes
20:27
Pavan Elthepu
Рет қаралды 41 М.
Understanding Kubernetes Networking. Part 1: Container Networking
56:11
The Learning Channel
Рет қаралды 92 М.
Advanced Scheduling in Kubernetes
24:57
Pavan Elthepu
Рет қаралды 21 М.
7 3 Service   NodePort
8:35
Cloud - DeepTech
Рет қаралды 2,6 М.
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН