DAY-37 | KUBERNETES SERVICES DEEP DIVE| LIVE DEMO | LEARN TRAFFIC FLOW USING KUBESHARK |
Вставка
- Опубліковано 15 жов 2024
- Support my work
www.buymeacoff... FREE DEVOPS COURSE
• DEVOPS ZERO TO HERO CO...
Hi Everyone, In today's class Day-37, We will learn about Kubernetes Services in Live Demo.
Have you watched a lot of videos on Kubernetes Service and still not clear on how does the services work in real time, This is the best video which demonstrates the services using a traffic debugger tool called KubeShark.
Watch the video till the end to understand how services handle Load balancing, Service discovery and Exposing applications to outside world.
Telegram channel
===============
telegram.me/ab...
About me:
-----------------
LinkedIn: / abhishek-veeramalla-77...
GitHub: github.com/iam...
Medium: / abhishekveeramalla-av
UA-cam: / @abhishekveeramalla .
.
Disclaimer: Unauthorized copying, reproduction, or distribution of this video content, in whole or in part, is strictly prohibited. Any attempt to upload, share, or use this content for commercial or non-commercial purposes without explicit permission from the owner will be subject to legal action. All rights reserved.
i have never seen such a clear explanation. even whole series is superb. can't thank you enough 😊
❤️
thanks Abhishek!!! for this awesome course. its day-37 and I learned lot of things from this course. As a fresher I start my learning from the scratch and if I got job then this credit goes to you Abhishek!!. again thank you so much for your informative content. 😍😍
😍
You are the best... I am waiting for my next switch to happen after this... More power and more luck to you..... 🤩😊😊 thanks bro...
Thanks for the support
Hi Abhishek,
I had to do 2 additional steps to access Nodeport outside Minikube cluster @27:00 timestamp on Mac M1.
Step 1: minikube tunnel
Stpe 2: minikube service --url
I see that it is not needed in your setup. Am I missing anything here? Thanks a lot for these amazing tutorials 🙏
Did you ran both commands in two different terminals? As I am still unable to access it outside
@@shantanusarode2777 same
Abhishek, Hats off to your efforts. You are doing a great job. 🎉 I have suggested your videos to all of my friends and colleagues. Thanks is a small word. 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏.
Means a lot, thanks !!
Thank you so much for explaining it so clearly, Abhishek. Can you please do a detailed video on Kubeshark in your upcoming Kubernetes troubleshooting videos? It would be really great if you talk in depth about this tool for debugging and troubleshooting the flow of network packets.
Abhishek your awesome .......i don't know how to acknowledge ur efforts ....hats off to you
So nice of you. Thanks
Hey Abhishek! Thanks for the clear explanation. If I want to do the same in EC2 instance do I need to install minikube in it? Because the AWS will allocate IP with the help of CCM if i didn't installed Minikube.
hello abhishek. how many total session will be in this course. and Please cover at least 5-10 project hands on. you're doing great job here for community. thank you so much.
I will try my best on that :)
Thank you abhishek!!! for example I have multiple services like it is running on different ports 3000, 3001, 3002, 3003, 3004. Here I will give in service file target section for port number of application. But external port number in service file what need to give. In this session you are running one application 8000 is container port and mapped with 80 for host. If have multiple applications running on different container parts how to map and configure.
You can give each service a different port number
@@AbhishekVeeramalla means are telling host ports right?
@@saikrishnajonnala9290no dear , you need to set port on service
Well explained. It will be great help if you can have one round of demo on Any Cloud service Provider which can demonstrate the how loadbalancer kick in auomatically by cloud service provider for Loabalancing type service.
It happens automatically, dont worry much about it :)
one small step was added from my end to video. we need to push to dockehub or registry once docker image built before depoying into kubernetes cluster. if you guys knows before me, please ignore.
Thank You soo much ❤
Thanks
Thanks buddy . I am just stucked for 30 min then came back here saw comment 😅 It worked 🎉 Once again thanks
@@shaikhsupdu-z9g what error you are getting. is it related to docker image. my comment is related to docker image. we need to push image to docker hub once it is built. So that Kubernetes cluster pick from Docker hub or registry. I hope this information is helpful.
Thanks sir for this amazing free tutorial 🤩
Always welcome
you are awesome...my suggestion to you is that after explaining the concept you should do a recap of it.
Yes Correct if we get the summary of it , it will be helpful may it can be done in the creative way like list some 10 to 15 questions on the topics which will help to revise the topic there and then . Helps to retain the concepts easily as well .
Thank you for great session..
Please upload realtime project on ci/cd pipeline with almost covering tool like docker,Ansible,K8S
Sure
Nice explanation.
It would be nice if you take one session about Service Mesh.
Thanks
Sure
Awesome video!!! Thank you for showing us how to be experts!
Glad you enjoyed it!
Hi Bro..I am getting confidence while watching ur videos ...Awesome explanation. Now I m in a position to ask doubts, one doubt here. Let's say application is not on cloud(i.e.; it is on premise) but deploying on Kubernetes, in that case how external world can access applications deployed on Kubernetes in Realtime. do we use Ingress controller to expose applications to external world?
Thanks so much Abhishek, one question if I create a service of type node port but my node is an ec2 instance with public ip, I still cannot access trough the global internet to it?
I think nodeport service doesn't allow access to the global internet, we should use the help of load balancer for it.
Abhishek bhai I have started learning from your Course it’s easy to understand and bhai one more thing can you make a video on python like how much python is needed for Devops and what all should we learn
I already made a video on Python.
You can also check my website for Python.
python-by-examples.readthedocs.io/en/latest/
It just has topics what DevOps engineers required.
@@AbhishekVeeramalla Thankyou bhai❤️
one small contribution from my side before deploying into the kubernetes cluster we need to push the docker images to the docker hub registry
awesome demo, i practiced, everything is running, thank you :)
Hi, I am facing an issue while accessing application by using service nodePort, clusterIP level it is accessable .could you please help me?
did you execute the load balancing part using kubeshark in ec2 instance ? I am facing some issue in installing the kubeshark
Hi sir, when start docker ur using ec2 instance, after that ur going use command line to create images in local system, how can you explain sir i didn't understand, in kubernets ur using the same way please explain me sir
Hi Sir Please create a video where we can understand the certification path for Kubernetes and after how many years of exp we should go for next certification after CKA
hi sir thanks for such a wonderful explanation
and another thing is that for deploying the k8s cluster if we are using ec2 instance i will get billed more ? because i have installed docker desktop that time my pc is not supported for VM it was very slow , if we are using cloud provider means the ram and cpu from cloud its self will take right ? and how you use the configuring things on you local CMD same as well need to do by remote CMD right ?
every min of your vdo is like great!!
Hi Abhishek anna
I have understood the concept of
Cluster Ip Nodeport and load balancer
But I am facing challenges to perform practical after watching 2-3 times ..
Yes I am also facing an issue, I am not able to access application while using service nodePort, what problem you are facing ?
@@sujeetrai8326 It shows me Connection Refused if I try to do minikube ssh and use cluster IP. Even if I try to use minikube IP on my browser, nothing appears!
Here I will not share score card but will spread love 🎉🎉🎉🎉❤ awesome sir nice concept
You did amazing concepts. My question is i install VMware workstation on top of my pc and top of VMware i installed Ubuntu server as kubernetes cluster and worker nodes while I am trying LB external ip is pending. So how can I get public address for my Ubuntu server where installed in VMware workstation?
Like I told you in the video .. It depends on your cloud provider .. if you are running on your personal laptop .. u will not get the external IP. Unless u use metallb
Excellent Session.Thanks Abhishek,
Glad you liked it
Crystal clear explanation....Thank you Sir
Welcome !!
Hi Abhisek do loadbalancer will work on onprem or private cloud?
Thank You Sir! This video was awesome!
Glad you liked it!
You are a gem thanks man❤️🔥
🙌
Hi Abhishek, One quick question if we use kubernetes itself as distributed edition in our project. Will there would be any kind of UI to monitor the pods health likewise in openshift console?
thanks sir for the excellent explanation😍
❤️
Thanks for this big effort abhi bro.
is kubeshark used in organization for live traffic or any other tool
in organizations.
Very Nice Abhishek Ji, keep it up
Thanks a lot
Hi Abhishek, if possible, can you please make detailed video on Kubeshark.
Thanks for the wonderful video. I am getting an error when trying to apply the deployment.error parsing deployment.yaml:error converting YAML to Json.I am working with command prompt . I am unable to run any deployments, is there something I am missing, thanks for your help!!
Hi Abhishek.. i have few queries which are as follows:
1. i tried running the container using docker file present in your git repository(mentioned in your video) but unable to do so as after running the "docker run " the command becomes unresponsive and I can see the container in exited state in "docker ps -a" cmd
Also i tried same thing with nginx docker file , the container was successfully created, so unable to perform this demo.
2. I faced problem with this Django application in Day 25 demo also my webpage was not opening giving error "site can't be reached" after configuring all the things mentioned by you.
please guide me what need to be done.
Thanks in advance 🙂
Hey Abhishek, Thanks for the amazing content
09:32 Why do you use Dockerfile?
It's runtime env in k8s right?
Pls correct/reply me
Hie Abhishek sir , I am preparing for cka exam and your k8 part is good to understand basic concepts.... If possible then also make a videos on cka ckad docker certification exam importance or series with respect to syllabas or how to crack or if someone from your contact who is attempt these certification then his interview.
ok sure
Abhishek, you have become my god.
🥹🥹
is there a detailed video on Kube shark please send link for abhisheks Kubeshark demo video
Kubeshark we are deploying on MAster node or Worker node?
Must we create a dockerfile and create image to give it in deployment yml file as image?
hi sir, nice explanation, iam getting connection refused when i execute curl -Lhttp command
.What to do for this problem?
Thanks !!
Hi, try to push your image to your docker hub.. First authenticate your docker hub id in your terminal then push the image, again pull and then apply the deployment.. Then minikube ssh and try to curl.. It will get connected
I am getting little confusion about the service discovery concept in this video. Please let me know how exactly service discovery works
Please watch the previous video on services .. Day 35 .. service discovery is very well explained
Nice video.Thanks Abhishek😊
Welcome
Hello, is it actually used on production level?
Thank you!!!
Hello abhishek, I am launching cluster via kubeadm on ec2 instances. I am creating loadbalancer service but the external ip is in pending state and external ip is not generated, can you please help or give some tips.
Thanks Abhisheki .I have a question though do you install Kubeshark on different terminal right?
It does not matter. You can also run it as a background process
Hi Abhishek. At 28:22, I am unable to access the application through curl and through the browser as well. The error states: curl: (28) Failed to connect to ip-address port 30007 after 21032 ms: Couldn't connect to server. I tried multiple times. But couldn't solve the issue. Can you help me with this.
Verify that the application within the pod is actually listening on port 30007. kubectl exec -it -- sh
Inside the pod, check if the application is running and listening on port 30007.
Hi Abhi,
How i can delete the running deploy with different image?
Eg: there are 3 deploy running on nginx and 2 in python, how can i delete the either one image.
Please help me here
Sir, What will happen if we don't expose the port? Will the application be accessible or not?
It will not be accessible from outside
Excellent Abhishek
Thanks
Nice explanation Anna ❤️😊
Thank you so much 🙂
thanks for this good content
Welcome
Hi Abhishek bro can please make a video How would you auto-scale the deployment based on network latency instead of CPU?
If there is network latency.. auto scaling won't help .. multi region or cross region replication will help :)
Thanks bro, for the awesome content 👌👌
Glad you enjoy it!
28:22
I have created the deployment and service. While I am trying to access the app using curl. I am getting curl (28) error couldn't connect to server. Please help me
even i'm stuck at the same thing, did u find any solution?
@@cooper6470 noo but by using ingress controller I got the output
Did you check the pod running State or not
Why my docker image is not building ,, showing error? at 05:54
same here did you get the solution if yes plase guide me
Yes for me also
@@hari4319 You can fix it by adding below line to your Dockerfile before the RUN command.
ENV PIP_BREAK_SYSTEM_PACKAGES 1. User . Kudos to @adewaleayeni-bepo2072
@@hari4319 add 'ENV PIP_BREAK_SYSTEM_PACKAGES 1' in your docker file before RUN command.
Hi Abishek what happens if a node goes down and you sre using node port type service
Very good question. You will learn the answer Ingress class but if you want answer now, usually there will be a ingress controller which constantly checks for the health of the target pods (nodeIP:port) and only forwards the requests to healthy pods on healthy nodes.
Can we incorporate kubeshark in our company..??is it safe ..??
Kube shark is a good tool about integrating it in your company .. I need to understand the architecture you have , I cannot comment without that
Sir why deploying 'deploy.yml' is required before deploying 'service.yml'?
and Thank you for everything sir..🙏
Please watch the videos in the same order. I have explained that
@@AbhishekVeeramallaSir, I am watching in order. But it looks like I have missed something. Let me watch again 😅.
Great. Thanks
Welcome
Bro port is for service inside pod and what is targetport and nodeport in svc yml file?
Informative 🙏👍
Thanks alot
hello abhishek, i'm confused about cluster ip, pod ip, port of your application , nodeport
Please watch videos before this, I explained them clearly
is there any way to access with nodeport, coz some restriction is there for creating load balancer
Yes, you can access nodeport as well
Hi Abhishek, can i put this on my resume will take one python-Django application and that application i will deploy on Kubernetes ,create deployment file and replica sets. and do service deployments on this application that are 1.nodeport service, 2.cluster Ip node service and3. load balancer node service. this is how i will expose applications to outside world and within the k8s cluster and within the organization.
yes u can put it.
When will we expect a dedicated video on kubeshark....?
Time line : 34:58 --> 30007 port is node,port 8000 is target port which is mentioned the image file for app. what about port 80, Is it container port?
Yes,port 80 is a container port
sir kind request facing issue to create image of the python it said externally-managed-environment . i am also follow the env environment in python but still facing this issue.
is it Mac m1?
@@sweditramteke8761 You can use
rm /usr/lib/python*/EXTERNALLY-MANAGED && \
after
apt-get install -y python3 python3-pip && \
I have tried as i too have the same mac M1
error:error: externally-managed-environment
fix :If you run into the error
ERROR: EXTERNALLY MANAGED ENVIRONMENT
You can fix it by adding below line to your Dockerfile before the RUN command.
ENV PIP_BREAK_SYSTEM_PACKAGES 1
@@shaikhsupdu-z9g same error but just continue the demo even you are unable to build image locally , in deployment.yaml file change the image : abhishekf5/python-sample-app-demo:v1 , use this image and enjoy next step
@@shaikhsupdu-z9g thank you so much was stuck on this, from a long time. It worked
I am using aws instances but in external IP showing pending
anna , while in case of lb , i am doing edit command replacing type from nodePort and loadbalancer . But it's showing that it was edted in /tmp file . or even , to edit in the form of yaml file , what do we need to give the cluster ip and ingress ip
very good information, but u went very fast , wanted to cover so much information in one shot I guess.
Thank you ^^
You're welcome 😊
Hello Abhishek Sir, I have one doubt that I need to push image to the docker hub before using it in thi yaml Manifest or we can use it without pushing it , When i used an image that I have to pushed to Docker Hub then my service works but when I use the image just after buiding it , it doesn't work.
Can you please specify it ? I have been stucked here for last 1 week. Please help me
you have to push it to your docker hub because the kubernetes pulls the image from your docker hub
Love the content
Awesome
in realworld projects how traffic checking done whether it's in monitoring tool or tool like Kube shark
Kubeshark can be used in realtime
@@AbhishekVeeramalla ok got it ... Thanks !
those who are doing this on their laptop should have the windows pro version the education version of windows will not have the windows feature called hyper-v if you have the pro version then only we can run the minikube on the vm otherwise by default your system will take the docker as a driver
Hi Abhishek
Great session
But when I am trying to deploy a pod using an image present in my local directory I am getting imagepullerror
Tried to troubleshoot but got no success.
You can deploy without pushing the image to registry.. first push the image to registry
@@AbhishekVeeramalla how can I do that ?
Do you mean I need to push it to dockerhub ?
yes @@bikramsingh9416
set imagePullPolicy: Never in deployment.yml this works if you are having image locally
Nice one ☺️
Thank you! Cheers!
Amazing Video 🔥
in the service.yml file what is the meaning of the port:80 , targetPort:8000 is the application which is running in port 8000 but what is the port:80 means ? video time : 24.11
listening port for service
in 28:22, I am not able to access the traffic with nodePort. After some search I can access with the command minikube service , which seems like it is tunneling my request to different minikube ip in a random port (not the port mentioned in service.yml). With this new tunneled url, there I was able to access the traffic. But can you explain me why is this and what could be my mistake ?
It seems like it is little inefficient way, since I have to keep a terminal open with minikube tunnel running. Am I correct ?
hey im also facing same problem i cannot access using nodeport ,connection refused is appearing how did u solve it??
@@deepakreddy1429 You can run this command: minikube service --url in a different terminal, which will give you a new url and from there you can access the traffic. This command essentially is tunneling your :30007 request to a different url. This different url you can use to access using both curl or from your browser.
If this is not clear, you can just open a new terminal and type minikube service command, it will display you all the process thats going on, under the hood. I hope it helps.
i am also facing the same issue too, command minikube service , which seems like it is tunneling my request to different minikube ip in a random port .Even with this new tunneled url i am not able to access the traffic. Please post here if you find the solution.
@@kumaraswamygorja I am not sure what problem you might be facing. In my case, tunneling request to localhost url with random port worked well.
It is very easy to make mistake with label and selectors, just a typo can mess up the entire workflow, so maybe confirm that your yml files are in sync.
@@nishanbaral5124Thankyou,it worked for me as well.
Hi bro, at 16:39 I'm not able to access then pod from cluster.. Getting connection refused. What could be the reason?
same issue
@@rohitbhushan7229 hey, i have resolved this by following below steps :
After creating the image (keep github username as your image name) push it to your github repository, and again pull and create the deployment file
Hey, I have the same problem! Did you find any solution??
thankyou sir
Most welcome
Great session
Thank you so much.
You're welcome!
how mny pods are generally created in realtime?
Depends on number of apps
Abhishek when i run kubectl apply cmd it shows "imagepullbackoff" error , how to troubleshoot?
Your image is not there in Docker hub
it means the image you are using is
1. Doesnt exist in the docker hub or
2. there might be a typo in the image name you have typed.
10:23
my pod is not in ready state. The state is 'ImagePullBackOff'
checked the deployment.yml file
what to do?
Image that you are using might not be available.. first check if the image is available in dockerhub
@@AbhishekVeeramalla the kubectl describe pod sample-python-app shows the below info
Failed to pull image "pratikk/python-sample-app-demo:v1": rpc error: code = Unknown desc = Error response from daemon: pull access denied for pratikk/python-sample-app-demo, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
the name of the image is correct and visible in the docker desktop on win
Fixed!
I pushed the image to docker hub then it worked
Could you please help on this getting requested access to the resources is denied I authenticated and it is successful please help@@PratikShastrakar
great work 😍
Thank you! Cheers!
Hi Abhi could you please elaborate on ImagePullBackOff and Errimagepull errors and how to avoid it? thanks.
Sure .. I will try to explain
Hi abhi sat through the entire night and resolved the issue. I was trying to index locally built image with the minikube. I uploaded the image to my docker repo, tagged the image and pushed it to my repo. then indexed the image(from docker repo) and applied the deployment. It worked.
also one suggestion abhi. Please also demonstrate in VScode with all the exts installed so it is easy to work around. Thanks
Thankyou bro I got the same error
Was stuck for 3hrs 🙂🙂
Finally fixed!
@@apollyonarchfiend7097 Thanks, it worked for me too...... After battling this issue for about a whole day, I decided to read through the comments for a solution.
hi abhishek, I am not sure wether you reply to this or not since its a old video.....at 16:48 for me connection is refused
take a look on the port
Hey Abhishek. Could you please explain different ports used in this video. Timestamp 26:30