Day 9/40 - Kubernetes Services Explained - ClusterIP vs NodePort vs Loadbalancer vs External

Поділитися
Вставка
  • Опубліковано 23 січ 2025

КОМЕНТАРІ • 128

  • @codinggeeg
    @codinggeeg 2 місяці тому +2

    You’re a genius! I never realized Kubernetes could be this simple until I watched your videos. You explain things so clearly-it just clicks. I’ve explored so many other channels for Kubernetes, but none compare to yours. You truly deserve at least a million subscribers. Keep up the amazing work; you're making a huge impact!

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  2 місяці тому +1

      Glad to hear you're finding my videos helpful, I'm working hard to make them as clear as possible! 💪

    • @codinggeeg
      @codinggeeg 2 місяці тому

      @@TechTutorialswithPiyush ❤

  • @rajbir_singh0517
    @rajbir_singh0517 4 місяці тому +2

    i am fresher no idea of any thing and trust me i am getting all concept like piece of cake. Thank you for such valuable contribution.

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  4 місяці тому

      Complete this series including all the tasks in GitHub and you won't consider yourself a fresher! All the best :)

  • @raisulkarim4726
    @raisulkarim4726 Місяць тому +1

    you are truly a Gem. Thanks Piyush for your contribution to the community...

  • @nope-ms4rx
    @nope-ms4rx 6 місяців тому +1

    Breaking down the basics with ease and helping laymen like myself make sense of all the endless documents that we can get caught up reading. You are the man Piyush!

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  6 місяців тому

      It feels great to know that my approach is well received by my viewers and you are seeing value in the content. That's all matters to me :)

  • @sonalpriya5503
    @sonalpriya5503 6 місяців тому +1

    Kubernetes Services seems simple now.
    Thank you for all of your efforts 🙂

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  6 місяців тому

      Kubernetes is simple, people just made a hype out of it. If you start enjoying Kubernetes, it's all a piece of cake considering you are doing hands-on, facing the issues and fixing the issue. Start with fundamentals and then gradually go in depth

  • @MihirModi-ix7zw
    @MihirModi-ix7zw 4 місяці тому

    One of the most important things you mentioned, sir, is exposing the IP address to the external world. An amazing and informative video!

  • @OleksandraPalmer
    @OleksandraPalmer 3 місяці тому +1

    I'm learning SO much! Thank you!

  • @vm_naveen
    @vm_naveen 6 місяців тому +1

    Thank you for the explanation on Services :)

  • @roia6011
    @roia6011 5 місяців тому +1

    Clear and simple , thank you !

  • @VarunK-ot6gm
    @VarunK-ot6gm 2 місяці тому +1

    Just amazing, thanks a lot for the effort

  • @guntreddirajesh
    @guntreddirajesh 6 місяців тому +1

    Thankyou so much piyush , i see lot of value in your content & the way you explain is awesome . on target to complete CKA certification with your videos

  • @venkateswarareddymukku2470
    @venkateswarareddymukku2470 Місяць тому

    "Fantastic video! 🌟 This has been incredibly helpful in deepening my understanding of Kubernetes. The explanations are clear, and the examples are practical-perfect for beginners and experienced learners alike. Thank you for sharing your knowledge! 🙌🚀"

  • @ruddyivanclarosfernandez8526
    @ruddyivanclarosfernandez8526 3 місяці тому +1

    Thank you Piyush!!!

  • @artbart9080
    @artbart9080 6 місяців тому +1

    Thank you! It took me some time to reproduce and understand service types.

  • @smitpatel700
    @smitpatel700 5 місяців тому

    Really thanks for your efforts. Till now I haven't find any problem to understand and implement the concepts. Thanks a lot.

  • @kanikv4480
    @kanikv4480 6 місяців тому

    Awesome class 🎉.
    Thank you for your valuable free content.❤❤❤

  • @floehden
    @floehden 6 місяців тому +1

    Thank you for this!

  • @alvarosanz4301
    @alvarosanz4301 4 місяці тому +1

    Very helpful video!

  • @vinaykumar-qq9wq
    @vinaykumar-qq9wq 6 місяців тому

    Couldn't watch for a week. But still able to relate things pretty well. Mastery in teaching. Keep up good work.
    Although I'm coming here to revise my kube knowledge. Your teaching skills are pretty neat ❤

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  6 місяців тому

      Well, I try to improve every time I can. Continuous improvement with the help of constant feedback, isn't that what a DevOps engineer does? :) Thank you for your support and feedback. I appreciate it

    • @vinaykumar-qq9wq
      @vinaykumar-qq9wq 6 місяців тому

      @@TechTutorialswithPiyush perfectly said. 👏👏

  • @atrofsk
    @atrofsk 6 місяців тому

    Thanks!

  • @shivamarora7050
    @shivamarora7050 Місяць тому +1

    26:36
    How can we do the same extraPort Mapping in minikube cluster instead of kind cluster?

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  Місяць тому

      Hello Shivam, Let's try to understand why we are doing the extraportmapping in Kind cluster? Kind is Kubernetes inside Docker, that means all the nodes are actually the docker containers so, to access any service that is hosted on a node, we need to expose the container(which is the node), that is why we need to expose the ports of nodes.
      Minikube doesn't work the same way, it uses your local machine as the node, you dont need to perform the extranode mapping for that. Hope it helps.

  • @GizMOLoopTech
    @GizMOLoopTech 6 місяців тому +1

    thanks Piyush bhai ..really helpful ..

  • @bhanubisht8
    @bhanubisht8 Місяць тому

    Completed the video....Thanks @Piyush Bhai

  • @varunjoshi4410
    @varunjoshi4410 3 місяці тому +1

    Thank you!

  • @sudheersen8227
    @sudheersen8227 5 місяців тому +1

    sir , 37:00 how to access application using cluster ip ? that cluster ip is not working when i am trying to acces application from the browser

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  5 місяців тому

      It should work on localhost:nodeport as this is what we used to expose the service

  • @radhikagudidesi5486
    @radhikagudidesi5486 6 місяців тому +2

    I installed Kind on the EC2 instance and am working there, while accessing the application 0f 30001 port I am getting a timed-out error, even though I added inbound rules for the node port and NACL is also allowing the port. Could you help me understand where I am getting wrong?

  • @DK-Tank01
    @DK-Tank01 5 місяців тому

    Very Good Explanation

  • @senthilkumar5129
    @senthilkumar5129 2 місяці тому

    Excellent thank you

  • @maheshwarareddy8629
    @maheshwarareddy8629 5 місяців тому +1

    very informative

  • @Imran_kpk
    @Imran_kpk 5 місяців тому

    V imperative thanks ❤❤

  • @akifsalah9686
    @akifsalah9686 6 місяців тому +1

    Thanks..!! Very Informative Video

  • @kmkumar0204
    @kmkumar0204 4 місяці тому +2

    If you're running Kubernetes on-premises or in a cloud environment that doesn't directly support LoadBalancer services (e.g., bare metal or a local development environment), you might need to use an Ingress Controller for managing external access to services. Ingress provides more advanced routing rules, such as URL-based routing, SSL termination, etc

  • @yudi281
    @yudi281 3 місяці тому +1

    why do we need loadbalancer service if we already have nodeport service it is also distributing the traffic between nodes right?

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  3 місяці тому

      With nodeport , you pass the traffic on a particular node and port, loadbalancer helps you expose the service externally, they have different purpose

  • @hetpatel1772
    @hetpatel1772 6 місяців тому +1

    i want to know does we had done something like port-mapping for kind cluster ?

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  6 місяців тому

      Yes, we have to do the port mapping for kind. As the containers are acting as node, we have to expose the containers on port

  • @shivakumara2212
    @shivakumara2212 6 днів тому +1

    Your videos are really helpful can you make a lecture on annotations

  • @Gerald_Louis
    @Gerald_Louis Місяць тому

    Hi Piyush. Thank you so much for this great series. You don't know how simplified you have made K8 for me. However, I am a little bit confused. When we create a nodePort Service, external users can access the pod through the nodePort sending traffic to the targetPort of the pod and the "port" is used for communication between pods of the same or different nodes. Now why then do we need ClusterIP if it is also for communication between Pods?

  • @GrigTech
    @GrigTech 4 місяці тому

    Thank YOu PIyush

  • @akifsalah9686
    @akifsalah9686 6 місяців тому +1

    So Using kind cluster we cannot run application through it has to be run through localhost?

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  6 місяців тому

      Kind is a local kubernetes installation meaning , everything is running locally and there is no external IP that's been exposed. so, yes it has to be accessed by localhost or you can use kubeadm installation of virtual machines, which we have covered later in the series.

  • @popurisrinivas5479
    @popurisrinivas5479 6 місяців тому +1

    Hi Piyush, How service and pod will talk each other. with help of match lables

  • @ebenezerbarning5093
    @ebenezerbarning5093 6 місяців тому +1

    thanks sir.

  • @yashgajendragadkar
    @yashgajendragadkar 4 місяці тому +1

    If I do not add extraPortMappings: - containerPort: hostPort: when creating a Kind cluster, will I still be able to expose the Service to the outside world using a LoadBalancer type service?

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  4 місяці тому

      Hello Yash, No , it will not work as the Kind cluster treats docker containers as Nodes, you have to expose these containers(Nodes) with the help of extraPortMapping. I hope I was able to answer the question.

    • @yashgajendragadkar
      @yashgajendragadkar 4 місяці тому

      Thanks !@@TechTutorialswithPiyush

  • @sagarbirla2879
    @sagarbirla2879 6 місяців тому +1

    amazingcontent

  • @shivanshusharma20.07
    @shivanshusharma20.07 4 місяці тому +1

    sir i created nodeport but i cannot access it on browser. With curl i can access node port. I am using minikube in google cloud. Please guide how i ca access nodeport on browser??

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  4 місяці тому

      As you are using minikube on a gcp vm, it should be accessible on vmexternalip:nodeport

  • @password301992
    @password301992 6 місяців тому +1

    Hi Piyush, thanks for winderful stuff ! I have one question here, let say if we want to expose few more ports in kind , so we really need to re-create the cluster with new port mappings ?

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  6 місяців тому +1

      Yes, you need to recreate the cluster as kind doesnt support cluster update. In day27, we will perform kubeadm installation on virtual machines which eliminate these kind of steps.

    • @password301992
      @password301992 6 місяців тому

      @@TechTutorialswithPiyush Awesome Thanks for prompt reply ! Kudos

  • @hiranyawg
    @hiranyawg 6 місяців тому +1

    Thank you very much Piyush can i use the Docker desktop instead of Kind

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  6 місяців тому +1

      You're welcome buddy! You can use, but I dont think it has a support for multi node cluster. Kind is simple to setup and use and it uses docker containers as nodes.

    • @hiranyawg
      @hiranyawg 6 місяців тому +1

      @@TechTutorialswithPiyush yes no multide ill setup kind

  • @ketankanadekets
    @ketankanadekets 4 місяці тому +1

    One quick question reg. NodePort svc
    Is NodePort svc binded to k8s node ?

  • @ayushbusy
    @ayushbusy Місяць тому

    I am new to Kubernetes and trying to understand the concept. Container is inside the pod and pod is inside the node, so in Kind cluster yaml, we exposed container port 30001 to host 30001, but in service, 30001 is a node port, so is node port and container port same here.

  • @AbdulMateen-bm3kv
    @AbdulMateen-bm3kv 5 місяців тому

    super sir

  • @pradeepnpkumar1881
    @pradeepnpkumar1881 6 місяців тому +1

    Thanks for the Video Piyush. Can you please make a video on how k8s networking will be handled in production environment

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  6 місяців тому

      Thanks Pradeep. Networking in production is really a complex topic hence, I did not want to cover for a beginner series. I will try to cover this once I am done with the CKA series.

  • @AnujDixit-h1o
    @AnujDixit-h1o 6 місяців тому +1

    thanks

  • @singhr49
    @singhr49 3 місяці тому +1

    Great Content, thanks for creating this.
    What tool do you use to record this session?

  • @Ganesh-tc4pi
    @Ganesh-tc4pi 5 місяців тому

    How can we rollouts multiple deployments like i have applied nginx scond jenkins and third tomcat images so how can rollout these

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  5 місяців тому

      For that you use package managers such as Helm and CICD tools, We will cover those once we are done with this series.

  • @BhaveshKansagaraOfficial
    @BhaveshKansagaraOfficial 6 місяців тому +1

    What would be real exposed port is 80 or 30001 because in one of my earlier particles getting output from 80 and not from 30001. I used minikube and for kind i use NodePort.

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  6 місяців тому

      Application is exposed on nodeport hence 30001 also we did the port mapping on 30001. Can you try to do port mapping in kind yaml on port 80 and then see on which port you are able to access the application on?

  • @salmanbintariq007
    @salmanbintariq007 6 місяців тому

    Sir i have a question. Can we have a service without selector? And what are the industry standards either they use Type LB or something else? Because LB type will be costly.

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  6 місяців тому +1

      Hello Salman, No, service needs a selector so that it expose a pod/deployment .
      Industry standard is to use a managed cloud loadbalancer(if they are on cloud) , external LB(such ad Big5, Metalb) if they are on-premises or a privata data centre and Ingress for applications exposed externally , for internal use , clusterIP and nodeport for some cases. We will be covering Ingress in video #33

  • @safooraNousheen
    @safooraNousheen 3 місяці тому +1

    Day-9 completed

  • @kmkumar0204
    @kmkumar0204 4 місяці тому +1

    I assume Piyush used his own K8s cluster deployed on AWS EC2 so LoadBalancer does not allocate a externalIP, however if you use any cloud provider ( manged K8s) then the manifest file will assign ExternalIP when its applied using the k apply command. thats the difference.

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  4 місяці тому

      That is true, I have used Kind cluster on my laptop that is why there is no external LB or external IP allocation.

  • @yamiyami3100
    @yamiyami3100 Місяць тому +1

    🎉🎉

  • @karnajeetsawant5635
    @karnajeetsawant5635 6 місяців тому +1

    woah.. Damn awesome video Piyush. That was a lot to cover. I dont know why but I got some kind of rush 😅. Understood all the part. However, I have this question. I know you might have covered in the videos, but still gotta ask. So, what exactly is the heirarchy in kubernetes. i mean I understood the basic like pod is the smallest unit, then node then all nodes form clusters etc. But if we talk on a different level, say replicastes, deployments etc. then what is the heirarchy over here?

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  6 місяців тому +3

      Thank you for the feedback! Pod is the smallest deployable unit in Kubernetes but the pod could have multiple containers. Pods are managed by replicaset which is then managed by deployment. Deployments are exposed by services and each of these resources can run on multiple nodes. Collection of similar nodes are called nodepools(cloud related concept) , multiple node pools form a cluster. Resources are also isolated among namespaces(next video) , there are other resources such as Daemonset, cronjobs, job etc which we will be covering in later videos. Hope this helps :)

  • @sarrlink8395
    @sarrlink8395 5 місяців тому

    Hello,
    I think there is an oversight regarding the creation of the cka-cluster3 cluster. If we look closely the version of the node is V1.30 instead of v1.29.4. You forgot to --image kindest/node:v1.29.4@sha256:3abb816a5b1061fb15c6e9e60856ec40d56b7b52bcea5f5f1350bc6e2320b6f8. THANKS.

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  5 місяців тому

      When we didn't add the image details, it takes the latest version by default

    • @sarrlink8395
      @sarrlink8395 5 місяців тому

      OK thanks@@TechTutorialswithPiyush

  • @tendaimakuwerere5693
    @tendaimakuwerere5693 6 місяців тому +1

    Thank you, #cka

  • @ketankanadekets
    @ketankanadekets 4 місяці тому +1

  • @Anonymous_810
    @Anonymous_810 6 місяців тому

    cfbr ♥

  • @shrihariharidas2817
    @shrihariharidas2817 3 місяці тому +1

    Hi Piyush When I try ro create cluster 3 23:16 in the video, I am facing issue with
    ✗ Preparing nodes 📦 📦 📦
    Deleted nodes: ["cka-cluster3-worker" "cka-cluster3-control-plane" "cka-cluster3-worker2"]
    ERROR: failed to create cluster: could not find a log line that matches "Reached target .*Multi-User System.*|detected cgroup v1"

    • @TechTutorialswithPiyush
      @TechTutorialswithPiyush  3 місяці тому +1

      This is a known issue and here's the solution
      github.com/kubernetes-sigs/kind/issues/3423#issuecomment-1872074526

    • @shrihariharidas2817
      @shrihariharidas2817 3 місяці тому

      @@TechTutorialswithPiyush Thanks it work

  • @hiranyawg
    @hiranyawg 6 місяців тому +1

    Thanks!

  • @gabrielakins8240
    @gabrielakins8240 6 місяців тому +1

    Thank you for this!

  • @gurum2364
    @gurum2364 6 місяців тому +1

    Thankyou