I'm not sure there is a benefit of the 5 minute approach, when you run commands it moves too fast to easily follow and some of the commands in the description are truncated. Also, the t3.micro instance only has 1 GB of RAM but when I tried to run the Kubernetes commands it complained that 2 GB is required. This needs to be updated, I'm following the steps exactly and getting many Kubernetes errors when running the sudo kubeadm init commands.
Great video! I had to pause, reverse, and re-watch certain points but you hit all of the relevant points like modifying the security group, enabling bridging, and setting the container networking interface. Saved me days of research. Thanks!
fantastic video, I absolutely loved it. It was almost a joy ride with the clock on. 🙂 Very clean explanation. I would love a whole series that covers the CKA exam tasks, just in this same style. I know I am asking for a lot. 😀
Thanks! Yeah sorry about that. There was a lot to cover and I didn't want to make the video too long. If there's any topic in this video that you'd like me to go into more detail on, just let me know and I'll make a separate video on it.
Thank you for your simple to follow tutorial, I was kind a confused guy watching bunch of irrelavent tutorials on Kubernetes but yours is very precise and right to the dot, thanks once again, May Allah bless you with more beneficial knowledge, ameen
can you make like complete beginner DevOps tutorials like what is docker etc? I particularly enjoyed your jupyter in the cloud vid and now I want to build my own web server (blog, newsletter, etc.) with kubernetes -> so thanks!
Thanks! Yes the responsibilities may vary greatly depending on the size and needs of the company or organization you're working for. The common themes though will be around designing and maintaining the cluster(s) your company has workloads on. As an admin, you may be called upon to make modifications to existing clusters to add new workloads, fix issues, harden security, or create new clusters for different use cases. Hope that helps! Let me know if you have more questions.
amazing video, Simple yet explanatory. What is next? Could you create a tutorial on how to get this nginx-server running on some domain? May be using Some Ingress?
After deploying Nginx, you also need to create some networking configurations to allow your new k8s cluster to accept and properly route incoming requests (i.e. from your browser) to the right application (in this case, nginx). An ingress controller does this for you. You just need to add it and tell it what to do. This page guides you on how to set it up. kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/ Hope that helps!
it's really amazing but faced a small issue while running the kubeadm init...as the containerd caused the trouble justby doing below steps 1) rm /etc/containerd/config.toml 2) restarted containerd issue resolved
Thanks so much for this video! I needed to create a quick configuration in AWS, but all the tutorials I found presented a pretty complex (production-like) infrastructure setup with LBs and multiple networking and IAM configurations and I didn't manage to get any of them working and spent like 4 hours just troubleshooting kubelet errors. With yours video I got a quickly up and running using a lot of the defaults and it works just fine :D
Few Questions : 1. In this present setup , Is it possible to communicate to Nginx from outside world ? 2. Currently Nginx is running in may pods , If one died , will it be recreated automatically ? 3. sudo kubeadm init --pod-network-cidr=10.244.0.0/16 This command is for ?
1. Absolutely! You just need to apply a few more configurations. The AWS security group for the servers need to allow inbound requests on port 80 for http (443 for https). Also, you need to configure kubernetes to take in those requests properly and pass them to nginx pods. This page shows you how to do that. kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/ 2. Great question. You can actually configure kubernetes on how to behave when one of them dies, but usually people set it to recreate the pod if one dies, and that might even be the default behavior in some cases. 3. This relates to the cluster's internal network. I'm defining the network address which all the pods (i.e. nginx servers) will run on. Kubernetes networking is a more in-depth topic, but this page can give you more info on it. I may make a video on it too if it would be helpful. Cheers.
Great, but what will happened if I have SQL server on it and the master node shuts down/the VM machine fail/ and I access the SQL by the IP address and port of the master machine??? I will lose the service?
One of the great things about kubernetes is the separation of control plane and data plane. When properly configured, the master node can actually go down, but your data flow to applications like SQL server on the worker nodes should not go through the master node at all, so your application will surprisingly still function! However, pod orchestration will be down, so if kubernetes will not be able to keep tabs on your SQL server and ensure it's still running, or create new/replacement pods for it while the master node is down. Hope that helps!
Coolest video I have ever seen. I want to implement on scenario would you make tutorial for that. On-prem cluster 1 Master-2 worker AWS 3workers And want to manage these 3 workers using on-prem master . Please make on video
I created the kubernets cluster using AWS instance everything run fine for 2mins all the pods were in running state but after that all the pods will go to crash loopbackoff state. I worked for 24hours on this and no solution please suggest me the solution
I work in hospitals with a software called EPIC, but I recently took a 3 month Kubernetes class. It's extremely complex, but I have developed a fundamental understanding of the processes. However, I'm not too confident in my CLI skills as it pertains to K8's. How did you learn, any suggestions?
Shiraz bhai I really like the way you explain steps, please keep uploading videos of topics you are comfortable with, I know you may be busy with your work but plz spare some time and make good tutorials this is going to help the world community in getting the real and genuine content. Thank you for this awesome video.
Thanks for the video ,but I want to say that we need an instance with at least 4GiB RAM... While trying this approach , I had a failure of kubeadm service , does anyone know why?
Hey Shiraz great video. Just one question I wanna clarify, if I have a frontend and backend app. Do I just deploy it into individual pods in one node. Or do I decouple the FE and BE into different nodes too?
Good question. It's often up to you, as long as you take the reliability considerations of the apps into account. Some real-world production scenarios have both frontend and backend pods on a single server, and then replicate it again on multiple servers for high availability. For light-weight applications, there's generally no issues. In other cases, the backend app requires so much resources that it could interfere with the frontend app if they're hosted on the same node (e.x. the backend app consumes all the network bandwidth or disk I/O of the server). In this case, just host them on separate servers if you have more available. In either case, stress-test the application and you'll have your answers. Hope that helps!
Thanks for the feedback! Looking at the kubeadm documentation now it looks like they’ve raised their minimum requirements since the time this video was published. You might still be able to get it to work on a t3.micro by installing an older version of kubeadm for testing purposes.
The beginning explanation was great. I don't really understand the race against the clock. If we all need to stop, slow down, rewind the video, then shouldn't you just explain it slower? I don't see who's benefitting by that clock being there
Thanks for the video, Can you do the cluster autoscaler for the same setup with AWS? Is it possible to with the same method or we need to change our settings to was cloud provider and do the cluster autoscaler?
Shiraz, great tutorial! I wanted to make a similar tutorial that goes more into depth on the networking bits and linux commands - any issues if I shout you out in my video for the parts that inspire mine?
Hi Deepak, what part of this process are you getting stuck on? If you’re finding this to be too cumbersome, EKS is the faster easier option, although it has its own separate learning curve as well.
@@ShirazHazrat Hi Sir, getting error like connection refused on port 8080 after installing kubernetes installaltion can you plz guide me how to seetup gmail: kumardeepakluck@gmail.com
This relates to the cluster's internal network. I'm defining the network address which all the pods (i.e. nginx servers) will run on and be able to communicate with each other on. By default, we want kubernetes to have a network separate from the host's network to run its workloads on. There may definitely be cases where you want the pods to have IPs on the hosts' network (i.e. VPC network), but this is not a good practice for security and stability purposes. Kubernetes networking is a more in-depth topic, but this page can give you more info on it. I may make a video on it too if it would be helpful. kubernetes.io/docs/concepts/cluster-administration/networking/ Cheers.
@@ShirazHazrat Does that mean that we could configure any IP ranges which we would like to? 10.244.0.0/16 is just an example right? We could do like 15.23.234.0/20, etc ?
ubuntu@ip-172-31-41-83:/etc/systemd/system$ sudo kubeadm init --pod-network-cidr=10.244.0.0/16 [init] Using Kubernetes version: v1.20.4 [preflight] Running pre-flight checks [WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at kubernetes.io/docs/setup/cri/ [WARNING SystemVerification]: this Docker version is not on the list of validated versions: 20.10.4. Latest validated version: 19.03 error execution phase preflight: [preflight] Some fatal errors occurred: [ERROR Mem]: the system RAM (953 MB) is less than the minimum 1700 MB [preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...` To see the stack trace of this error execute with --v=5 or higher any way out for this , docker and kubernetes installed but having issue at this point..
Your site's replication/failover/self healing etc ability are limited by your site's access to the database. The whole idea of container orchestration and containers absolutely fails with databases since data has to be stored somewhere not inside a "stateless" container. Containers just don't replicate databases properly. If you use container orchestration without properly replicating/making data highly available, you're still going to get the "single point of failure" problem and no amount of nginx servers being spun up will fix that. Sure, you need less database instances than web servers/cdns/whatever, but you still need to replicate your database. You don't do that with kubernetes. Even in non production environments, databases are just "copy pasted" with full manual migrations when you need to replicate it. No docker, no kuberntes, nothing like that. Just be aware of that when buying into the kubernetes fad.
Thanks for the video! I'm having trouble with kubeadm init (step 4) when it's waiting for kubelet to boot up the control plane pods (right after creating pod manifests). This is the output I'm getting: [wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s [kubelet-check] Initial timeout of 40s passed. [kubelet-check] It seems like the kubelet isn't running or healthy. [kubelet-check] The HTTP call equal to 'curl -sSL localhost:10248/healthz' failed with error: Get "localhost:10248/healthz": dial tcp 127.0.0.1:10248: connect: connection refused. ** repeats the last two outputs a couple times ** When I check kubelets status with journalctl it says: "failed to run Kubelet: misconfiguration: kubelet cgroup driver: \"systemd\" is different from docker cgroup driver: \"cgroupfs\" I'm running a t3.small (micro doesn't have enough ram anymore) image: Ubuntu Server 20.04 LTS (HVM), SSD Volume Type - ami-00399ec92321828f5 (64-bit x86) / ami-08e6b682a466887dd (64-bit Arm) Only ran the commands listed in this tutorial. Any idea what might be happening here?
the problem was cgroup driver. Kubernetes cgroup driver was set to systems but docker was set to systemd. Solved : 1- create json file /etc/docker/daemon.json then write { "exec-opts":["native.cgroupdriver=systemd"] } and save it . 2- sudo systemctl daemon-reload 3- sudo systemctl restart docker 4- sudo systemctl restart kubelet