Day-33 | KUBERNETES PODS | DEPLOY YOUR FIRST APP |
Вставка
- Опубліковано 1 жов 2024
- Support my work
www.buymeacoff... FREE DEVOPS COURSE
• DEVOPS ZERO TO HERO CO...
KUBERNETES IS EASY
===================
Don't feel so ??? Watch the next 10 videos on the channel and you will second me .
DAY-33: KUBERNETES PODS
---------------------------------------------------------
What will you learn ?
1. Container vs Pod
2. What is Kubectl && Installation
3. Minikube Installation
2. How to create a Pod ?
3. How to write your first Pod ?
4. Advantages of Pods ?
Minikube Installation complete video
=============================
• Install Kubernetes on ...
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.
do i need to lunch a server for me to run my first Kubernetes for this lesson pls cos i have tried my terminal with visual studio but not connecting . or how do i get a complete video with window installation to make my life good plsssssssss
Hi @abhishek
I see you mentioned minikube ssh which gets into cluster is that means logging into that nginx container or the minikube pod?
hi abhishek, as i am trying to install minikube in EC2 instance it is getting an error
" New-Item: command not found
Invoke-WebRequest: command not found "
does EC2 instance support minikube or not ?
I just finished watching it. I love how you break things down for us to understand. You are the best!!!
Glad it was helpful!
I am not able to run the KubeCtl after installation. I am getting error: The connection to the server localhost:8080 was refused - did you specify the right host or port? Is it suppose to happen like this? What you have displayed is not exactly what I am getting. Please let me know why and what to do to get rid of this scenario.
Heyy I'm also getting the same issue did u got answer pls tell me too if u solved
Hi sir i'm getting this error while starting minikube
The connection to the server localhost:8080 was refused - did you specify the right host or port?
that means that your kubernetes cluster is not started.
Same error i got.... what should I do plzz help mee
@@AbhishekVeeramalla how can I start...i got error local host 8080 was refused.. help me bro
Same error if kise k solve hua toh batao please 😢
That means your minikube cluster is not started. Or kubeconfig file is not pointing to minikube
Most of the time pod is a single container. But sumtime you have side car or init container, that read config file or any file from other container and utilize it
Ip address are generated for pod from range of podCIDR.
Pod is a wrapper around container.
Kubeproxy generates the ip address for pod( cluster ip address).
Kubernetes allow shared networking and shared storage for multi container pod. Since localhost communication happens within the pod.
Inaccurate Points:
Pod IP Address Allocation:
PodCIDR Range: Correct, IP addresses for Pods are typically allocated from a range defined by the podCIDR assigned to each node.
CNI Plugin Role: The CNI (Container Network Interface) plugin is responsible for assigning IP addresses to Pods and setting up their networking.
Kube-Proxy's Role: kube-proxy does not generate IP addresses for Pods. Instead, it manages network rules for routing traffic to Services within the cluster. kube-proxy sets up rules to handle traffic to ClusterIP addresses but does not assign these IP addresses.
ClusterIP Address Assignment:
ClusterIP: The ClusterIP is a virtual IP address assigned to a Kubernetes Service by the Kubernetes API server, not by kube-proxy. This IP address allows Pods to communicate with each other through Services.
Corrected and Detailed Explanation:
IP Address Assignment for Pods:
When a Pod is scheduled on a node, the Kubernetes control plane (API server and scheduler) coordinates with the kubelet running on the node.
The kubelet invokes the CNI plugin to create the network namespace for the Pod and assigns it an IP address from the podCIDR range allocated to the node.
kube-proxy's Function:
kube-proxy watches the Kubernetes API for changes to Services and Endpoints.
It maintains network rules on each node to direct traffic from Services to the appropriate Pods using mechanisms like iptables or IPVS.
Communication Within Pods:
Containers within a Pod share the same network namespace, allowing them to communicate via localhost.
They also share storage volumes defined in the Pod specification, enabling shared data access.
ClusterIP Assignment:
When a Service is created, the Kubernetes API server assigns it a ClusterIP from the service-cluster-ip-range specified in the API server configuration.
kube-proxy then sets up the necessary rules to route traffic to the Service's ClusterIP to the appropriate backend Pods.
Summary
Pod IPs: Managed by the CNI plugin, allocated from the node’s podCIDR.
ClusterIP: Assigned by the Kubernetes API server, not by kube-proxy.
kube-proxy: Manages network rules for Service traffic, does not assign IPs.
Pod Networking: Shared network namespace and localhost communication within the Pod.
Pod Storage: Shared volumes for data sharing between containers in a Pod.
By understanding these roles and processes, it's clear how Kubernetes manages container networking and addresses within the cluster.
@@jamespanchol6402 Bro @11.59 abhishek mentioned that Kubeproxy generates the cluster Ip address
Yes!!!! I have been refreshing my UA-cam since yesterday, waiting for your video. I'm about to watch it. By the way, you labeled it Day 30 instead of Day 33.
❤️
Bro please provide a video for installation of minicube or provide a video link bro please 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏i am trying.but minicube not started..
in mobatex:- kubectl command is not working...
Thanks Abhishek,
I practiced its working and i thought Kubernetes is very difficult to understand by way of your explanation it was clear understanding, thank you so much
😍😍
Hi bro Im about to start course, the question from my side can i crack interview as 3+ experience guy after going through all your videos perfectly..
yes for sure, keep practicing after every video
Thank you for all your efforts and support and What I like mostly is "like I told you & basically"😊
You are so welcome!
Thank you Abhishek for this course, now I feel that kubernetes is easy
⛔ exiting due to rsrc_insufficient_cores: has less than 2 cpus available, but kubernetes requires at least 2 to be available (what should i do now !!!!)
Ur problem got solved??
I'm also getting the same issue help me out nahh
the commands which your using in Iterm its not working in mobxterm its totally confuised
Thanks for all your efforts and support to this Devops community Abhishek, really much appreciated and you explain the things in a simple and easy way. Thankyou so much Abhishek
Welcome 🤗
Congrats to me. I have made it to Day 33 🎈
super
Thank you, I am profoundly humbled, beyond what I could have imagined.
👐👐
🚀
hats off to your efforte sir but can u please display how to install kubectl and minikubes on ec2 instance?
Hi Abishek i have Two Question 1. In organization using private git Repository OR Public Repository and 2. Docker Repository whether Public or Private Repository use please
Private repositories for both git and docker containers.
Thank You ❤ But I have a doubt, Is kubernetes really tough or you just made K8s simple ? You are having a great teaching skill Brthr.
Thanks
Hi Abhishek : at @5:54 you are mentioning that we use Docker CLI to have the configuration but Docker also Supports Docker compose to build the multi-container with the YAML . I think POD has different context You can’t compare this in-terms of CLI or YAML files .
It is just for each understanding.
Your Superb bro and excellent effort tqsm 👌 👏🏿 🙌 💪
Thanks alot
Hi Abhishek, How can we use minikube or kind on WSL2?
If interviewer ( Deloitte )ask to me 1st questions?
What is your project and tell me architecture and in that project what is your roles and responsibility explain to me briefly ?
In my resume I was putting
K8S and docker and terraform and cicd-Jenkins and aws
sure, will make a video, if possible
Can I follow this if I use Azure instead of AWS ( is it vendor-focused, or is it generic to all K8s)?
Its generic
Sir please please 🙏 provide how to set k8s cluster please this my humble request sir please 🙏🙏🙏🙏🙏🙏🙏🙏
Did you watch day 32 ?
Also check the link the description.
All the details provided.
If you want to create a production grade cluster .. watch Day 32 .. created using KOPS
If you want to do it locally .. watch today video for minikube .. also you can check the link in description.
Hello abhishek please cerate plalist for openshift also 🙏
Hi Sir @Abhishek as always great content, learning a lot from your videos ❤❤❤
One DOUBT-- when we use CMD Promt or Power shell we are not able to use VIM commands , pls let us know how to resolve this issue or if we can use any other cmd line in windows
Yes use gitbash
Thank you Sir 🙂
Hi abhi
In real environment where does Kubectl installed in master panel or in our laptop. or , Both.
on the virtual machine or office laptop that you are using
HI abhishek , i have a query , while i try to start minikube i get this error : Exiting due to RSRC_INSUFFICIENT_CORES: Requested cpu count 2 is greater than the available cpus of 1
you need to use t2.medium atleast
@@AbhishekVeeramalla yess !! Got it !! Thanks for the Reply Abhi ♥️🤝.
In powershell if we use vi its showing command recognized please guide me
Yes u should not use powershell. Install gitbash and use that shell
Hi Abhishek, I have one doubt about the Minikube driver! I am a Windows user and I have installed Minikube with the default docker driver When I am playing around with Minikube and GitOps. I get the error that is unable to resolve the docker driver. My question is what would be the best docker driver for Windows while practicing with advanced topics and the time stamp is 21:30.
anybody using on Mac m1 and facing issue?
I have downloaded kubectl and minikube but not worked? how? i think some setting missed in this video.
Try If it is Windows, You need move those into specific folder and run commands from the folder location.
I use Ubuntu Client VM on top of my windows machine, post running minikube cluster on it using Docker as driver the machine crashed, :(
Sir I have major issue is how to restart the master and worker node after those instances are stopped because when I have restarted instances worker nodes are in ready mode but master node is Not Ready mode...
Please provide more details .. Which components are not coming up ? Where is this instance ? How are you starting ?
Most of us don't have a Mac.
Works on normal windows also
Also Abhishek, I have doubt that in order to access that nginx inside the pod we can you use that IP address with port no right
You can use kubectl exec -it nginx to login to the pod.
But before that you have to do
minikube ssh
Abhishek thanks is a small word but you are providing more than we expect, But i have small doubt pod status is showing as running. but how can i check that from browser ? Do we need to give ingress and Egress values? I tried checking with IP:80 but its showing as not reachable .
You will learn that in next videos of the series .. when u learn about services and ingress
@@AbhishekVeeramalla got you Abhishek thanks a lot !!!
Great explanation thanks was looking for this, have a RKE2 cluster that is finally configured how i want, now i'm ready to put pods on it and use Longhorn instead of that crappy mounting we did with docker.
Sir, can I install Kubectl and minikube inside my free tier aws ec2 instance? it's no charging, right?
Free tier instance will not have enough resources to handle them
@@AbhishekVeeramalla Thank you sir
hi C:\Users\pylav\Downloads>kubectl create -f file.yaml
Error: unknown shorthand flag: 'f' in -f how to fix it
who, what, how, is the decision on the number of master/worker nodes to be created decided?? how does one know how many master nodes, how many worker nodes are to be created? i.e. what is the rationale for deciding on the architecture/layout of a cluster (how many master notes/worker nodes are to be in a cluster)???
hello abhishek, minikube and kubectl aren't opening in my laptop pls help me in rectifying the issue.
How to create vm for windows and linux while creating cluster. As you said hyperkit for mac can you tell for windows and linux.
Just for doubt clarification, Minikube now support multi node cluster right? Thanks so much you are the best.
Installed successfully minikube and kubectl but when trying to create yml file on window powershell .. i am not able to create yml file ..
How do you debug a pod.. Kubectl describe pod and it will print information of pod and get issues inside the pod , events kubectl logs
hey abhishek anna , loving your videos gaining immersive knowledge as well , just a request if possible can we get a video on managing these services on an actual k8's or eks ?
it would be really great
Its already available. Check day-23 in aws playlist
@@AbhishekVeeramalla sure , thank you for the reply, ♥️
How to deploy docker image in qa environment using kubernet?
I did the cluster set-up in Kubernetes using Kubeadm in azure Cloud with multipe nodes, but i have a question here can we use kubeadm tool for setting up the Kubernetes cluster in production?
Yes .. It is widely used
@@AbhishekVeeramalla 👍
bro i am confusing about terminal how u installed and how u used it please help me
Best platform for kubernetes practices??
Killer coda
thanks bro for teaching us
It's my pleasure
Hi Abhishek , After running the kubectl get nodes
NAME STATUS ROLES AGE VERSION
minikube Ready control-plane 12m v1.30.0
But master not showing . Please help me
control-plane is the master node ...you can see this in day 31 of kubernetes
How did you copy the yaml file and paste it on terminal
Shift + insert
24:00, If i want use my own image which is not present in Docker Hub. How I can use it?
Which image .. provide the details.. i can push that
Here you are using an image as nginx:1.14.2. this is available in Docker Hub. In real time like we can't put our images in docker hub right for security purposes. Then how we will use our application image here to deploy as a pod.
Thank You Sir!
After a lot of trying, i have done it.
😍😍
Thank you so much sir for sharing such a great knowledge of k8's with us
😊
It's my pleasure
If we are using real time Kubernetes instead of Minicube... Then can I know the ssh command to deploy the POD...
Hi how to add the nodes? How exactly Pod.yml identify the nodes
Thanks
In real environment you will deploy deployment, daemonsets and statefulsets
I have learned a lot from this video. i have done practical task on it successfully. But I have some questions in my mind after the practically execution of this video.
1) can we see the nginx page on our browser?
2)i have used ubuntu server of AWS.... and used Docker as a driver. is it good practice or do we have any other option for ubuntu.
Hi how u did can u help me, it was saying I need 2cpu at least when I run the command minikube start I'm not getting here
Hi abhi, do we need to choose installation setup for laptop os or terminal os to install kubectl or minikube? ..i am having windows laptop and terminal i use linux os (mobaxterm).... Please reply...very confusing since i am new to IT ...kubectl is not installing for me...if someone knows it ..please reply
create an ec2 instance by choosing t2-medium instance
Kubectl logs -f pod podname
-f not needed
Hi Abhishek, in a production environment how can we avoid a kubernetes pod to go down since the application we are running is having a stateful session. Pod going down is giving us a bad user experience
Why didn't u use kubernetes extension of Docker Desktop
Hi Abhishek, Thanks for the details. As suggested in the video i have followed the steps install K8s cluster and kubectl. When I run kubectl command it is asking for username and password. Please confirm how to resolve this issue.
Very informative channel. May I to ask to record series on SQL/NoSQL and database concepts?
Woohoo! I love Kubernetes!
❤️
This man is og
i have been learning kubernetes was not that much clear but lots of doubt has be made clear
Thanks for the videos
Thanks a lot! this really helps!
Most welcome
Abhishek how can install in a local in our Linux environment?
Is it ok to use windows
Yes its ok to use windows .but better to install Linux
@@AbhishekVeeramalla Do we need to have vagrant or something.just want to be clear as I havent the Linux in a local.The way of teaching is awesome .is this a 45 days course which we are in 33rd day.
@@AbhishekVeeramalla please provide link to install linux
if we are created cluster, not we don't need to create pod separately ? right , we are just running the pod ?
but then what if in case of kubernetes deployement , here we also have pods?
Thank you abhishek .The way you are Teaching is faboulous
It's my pleasure
thanks for the great video sir🤟. when i created pods the internal ip is assigned as public and it shows my external ip is pending how to i login into cluster and check the status and atlast it is given as error could not connect how to resolve this error
Thank you Abhishek. You are a Gem. Kubernetes was never this easy for me.
Awesome 😎
❤
❤️
what is the diff between kubectl apply -f pod and kubectl create -f pod? because you have used both in this video...
create can be used only for the ist time while creating whereas apply can be used any no of times for modifying ur yml file
hi abhi
can u make one video regarding eks , minikube , openshift etc and also while learning aws devops which one should we learn eks or the one u r teaching us
Thank you so much for shared these information's.
Quality Content .
Thank you so much
19th Feb, 2024
👌bro
Thanks bro
Done😁✌
Congratz Abhishek for 100K subscribers. I am proud that I am one of them 😊
Thank you so much 😀
Nice one
Thanks
Only if I learnt this 5 years ago.
I learnt but no projects 😂😅
Thank you so much for sharing!
Thank you explain the things in a simple and easy way, can you show how to setup k8s in production.
I explained the k8s setup using kops
Hi Abhishek, you installed kubectl n minikube locally in this session . Is there a session about the same in ec2 as well ?
I too have the same doubt, i couldn't install kubectl and minikube on my local machine
it will be same just choose t-small while creating ec2
Can we do k8s practice on ubuntu??
Yes, you can
Day-33 Done✅
nice
I am running minikube start, on the ubuntu machine, but getting below error,
Exiting due to RSRC_INSUFFICIENT_CORES: has less than 2 CPUs available, but Kubernetes requires at least 2 to be available
How can I fix this ?
in ec2 insatnce you have to take t2.medium when you lanch the ec2....
Thaaaanksssss Abhishek, you rock.....
❤️