K3S (by Rancher) | Setup a lightweight Kubernetes Cluster in Minutes | Hands-on Tutorial

Ғылым және технология

K3S (by Rancher) Setup a lightweight Kubernetes Cluster in Minutes | Hands-on Tutorial
🔥 Today’s topic: A hands-on session off a great Kubernetes distribution K3S 🔥
I’d like to give you a first basic hands-on guide on K3S. A lightweight Kubernetes distribution which you can install on any Linux host in minutes or even in around 30 seconds. We’ll also have a look at how we can extend our Cluster with worker nodes followed by the installation of a Nginx ingress controller.
Finally we’ll deploy a demo application.
#k3s #rancher #containerd #docker #kuberntes #k8s #cloudversity #cloud_versity #linode
Feel free to ask any questions in the comments down below and give me your honest feedback.
🔗 k3s.io/
🔗 k3d.io/
Timestamps ⏰
0:00 Intro
1:14 Some theory
4:50 Preparation in advance
6:15 Install K3S Master node
8:35 Install K3S Worker node
11:34 Install Nginx ingress controller
16:00 Install a demo application
20:30 Summary and outro
🔥 GitLab Repo 🔥
► bit.ly/3xFf9v1
🔥 Social Media 🔥
Twitter ► / cloud_versity
Instagram ► / cloudversity
🔥 Support 🔥
👉🏼 Buy me a coffee: bit.ly/36vJhh4
👉🏼 Become a patreon: bit.ly/36wXquA
🔗 cloud-versity.com

Пікірлер: 58

  • @jorgealvarez4323
    @jorgealvarez43233 ай бұрын

    Awesome video! You explained everything really well thank you! I’m looking forward to checking out more of your content

  • @DidoMG
    @DidoMG Жыл бұрын

    if you get issues installing try to replace "--no-deploy traefik" with "--disable traefik" it may be the fix for you it did work for me

  • @chrisumali9841
    @chrisumali9841 Жыл бұрын

    thanks for the demo and info, have a great day

  • @atwinemugume
    @atwinemugume Жыл бұрын

    Great video, thanks. It helped me in my project. i have already installed k3s on my two servers and up and running in less than the time I used to use installing k8s with kubeadm

  • @mcdebugger
    @mcdebugger Жыл бұрын

    Thank you! Very useful video!

  • @dmmd5329
    @dmmd5329 Жыл бұрын

    2/4/2023 it still works! Amazing! Thank you man you saved my life

  • @jananathbanuka4994

    @jananathbanuka4994

    Жыл бұрын

    Hi, how do you have the public IP's for EXTERNAL-IP?

  • @ltonchis1245
    @ltonchis1245 Жыл бұрын

    Could you make more Rancher videos? it's a popular topic and there isn't much tutorials about making a self hosted Rancher setup with low end hardware specs ( load balancing )

  • @fernsmark18
    @fernsmark182 жыл бұрын

    Thank you. This helped me setup the cluster on gcp gce vm. Cheers.

  • @CloudVersityOfficial

    @CloudVersityOfficial

    2 жыл бұрын

    Great to hear that.

  • @nauticaorangewatchbg9923
    @nauticaorangewatchbg99232 жыл бұрын

    I 'm in the middle of moving to another company where they use Rancher, so this video was really helpful

  • @FirmanRosdiansyah

    @FirmanRosdiansyah

    2 жыл бұрын

    If only Rancher is mentioned I think it is `rke`, not k3s

  • @JakubWosyka
    @JakubWosyka2 жыл бұрын

    Good job!

  • @CloudVersityOfficial

    @CloudVersityOfficial

    2 жыл бұрын

    Thank you =)

  • @redmictian
    @redmictian3 жыл бұрын

    Surprisingly, the video was super helpful, despite the views count!

  • @CloudVersityOfficial

    @CloudVersityOfficial

    3 жыл бұрын

    This is some great feedback! Feel free to subscribe if you interested in topic like this. Growing a new channel isn't that easy. ;)

  • @redmictian

    @redmictian

    3 жыл бұрын

    @@CloudVersityOfficial Not harder than setting up a cluster for the first time, while learning how to do it, and all this for production environment:)) One of the super useful things you showed was the nip.io service - I didn't know about it. However, it doesn't seem to fit a production environment approach, so it would be awesome if you could explain like what are the most basic ways to expose services like a database to a local network in which the k3s cluster is located, and a service to the internet. In my case, I already exposed those using simple nodeport, but I know it's not ideal.

  • @CloudVersityOfficial

    @CloudVersityOfficial

    3 жыл бұрын

    @@redmictian Thanks for the input. I'll put that on my todo list. :) Routing and securely exposing stuff always causes headaches and gets complicated pretty fast but I'll see what I can do. nip.io is for playground environments, as soon as you go in the direction of production environments your goal should be to have a valid DNS.

  • @tunlinaung010
    @tunlinaung010 Жыл бұрын

    Plz make more video for k3s. Thanks bro

  • @mza9738
    @mza97382 жыл бұрын

    Do you maybe know how do you use external IP on gcp with k3s? I tried this example on GCP and it does not work.

  • @RoberFrost1
    @RoberFrost14 ай бұрын

    i'm trying to install k3s on a Raspberry Pi 4 Model B 4Gb, but i have some problem. First problem, when i install the master node, the installation give me a this error "Job for k3s.service failed because the control process exited with error code. See "systemctl status k3s.service" and "journalctl -xeu k3s.service" for details." Second problem, when i use " cat /var/lib/rancher/k3s/server/node-token" the console give me the error "permission denied". I don't know where is the problem :(

  • @RameshKumar-rt8xb
    @RameshKumar-rt8xb Жыл бұрын

    how to add more masters to the cluster?

  • @jaguarreal9116
    @jaguarreal9116 Жыл бұрын

    Good video. Is there a reason why not keep the default ingress controller (Treafik)? Also, would you give thoughts on how to approach a two-node cluster (e.g. like to Pis) where one is a redundant of the other in case the first fails. No chance to have 3rd or more.

  • @CloudVersityOfficial

    @CloudVersityOfficial

    Жыл бұрын

    Hej dude, I'm just more familiar with Nginx. If you like Treafik go with it ;) K8s/K3s stands for high availability, so if one node fails it'll always try its best to keep all pods running on another node. Of course you need to make sure, that your "brain" the master node is deployed in a HA setup as well, otherwise your worker nodes would be kind of "brainless". There shouldn't be a redundant server, all of them can work and balance their load in terms of deployed pods and resource management.

  • @hellfire1980
    @hellfire19802 жыл бұрын

    Can k3s use for production environment? What will be the reasons if it's not recommended to use on production?

  • @farhanyousaf5616

    @farhanyousaf5616

    2 жыл бұрын

    No reason not to use it in prod. It is meant for that. Just has a lighter foot print.

  • @CloudVersityOfficial
    @CloudVersityOfficial2 жыл бұрын

    I just recognized, that I linked to the wrong Twitter profile in this video :D 🔥 Social Media 🔥 Twitter ► twitter.com/cloud_versity Instagram ► instagram.com/cloudversity

  • @enescetinkaya2396

    @enescetinkaya2396

    2 жыл бұрын

    hi, please make a how to create high availability kubernetes cluster video. for example 2 master 3 worker.

  • @rduballday
    @rduballday Жыл бұрын

    In the manifest.yaml, what IP is set for in the Host Ingress rules? Should this me my public IP , one of the the k3s public or private IP's?

  • @CloudVersityOfficial

    @CloudVersityOfficial

    Жыл бұрын

    The public IP from your ingress-nginx load balancer. Time stamp around 15:15

  • @ganon4
    @ganon42 жыл бұрын

    Thank you very much for your video. I'm doing a k3s cluster across 3 vm with tailscale and thanks to your tutorial I was able to create the server & node easly. I just got an error deploying the manifest ..... dial tcp cluster-ip:443 io/timeout ..... and if I find the solution I'll reply here.

  • @ganon4

    @ganon4

    2 жыл бұрын

    Well I couldn't find a solution, I tried again reinstalling my vps and using your cmd but I end up always with the same error msg: Error from server (InternalError): error when creating "manifest.yaml": Internal error occurred: failed calling webhook "validate.nginx.ingress.kubernetes.io": Post "ingress-nginx-controller-admission.ingress-nginx.svc:443/networking/v1beta1/ingresses?timeout=10s": dial tcp 10.43.35.60:443: connect: connection refused

  • @janrenz7690

    @janrenz7690

    2 жыл бұрын

    I am facing the same issue. Does anybody have an idea?

  • @ugurserhattoy

    @ugurserhattoy

    2 жыл бұрын

    @@janrenz7690 ​ @ganon4u do you guys got a solution for that? I am facing it too.

  • @nguyensang8234

    @nguyensang8234

    Жыл бұрын

    @@ugurserhattoy same issue: just delete the ingress-nginx-controller-admission in ingress-nginx namespace or just reinstall ingress-nginx by helm method. That's it.

  • @zariffathurrahman6454
    @zariffathurrahman64542 жыл бұрын

    so this mean that master node also function a load balancer using nginx? correct me if im wrong. im still new to this. :)

  • @CloudVersityOfficial

    @CloudVersityOfficial

    2 жыл бұрын

    As I set it up in this video, yes. But you can of course change this to your liking ;)

  • @davidchristensen1219
    @davidchristensen1219 Жыл бұрын

    Might be good to update repo README with correct install option to "--disable" traefik". Seems the "no-deploy" flag is now deprated.

  • @CloudVersityOfficial

    @CloudVersityOfficial

    Жыл бұрын

    Thank you for the heads-up :) Updated the README immediately.

  • @soubaneimane1814
    @soubaneimane18143 жыл бұрын

    very helpful video, thank you. i have a question please, can we deploy the demo application in the agent node or only in the server node?

  • @CloudVersityOfficial

    @CloudVersityOfficial

    3 жыл бұрын

    I'm glad that it was helpful to you ;) Actually k3s will deploy workloads per default also on the server nodes. If you want to have you control plane separated from your workloads you can leverage from "taints". Here is a link to the k3s documentation which covers that point: rancher.com/docs/k3s/latest/en/installation/ha/#2-launch-server-nodes You can just add the option to the install command like: curl -sfL get.k3s.io | sh -s - server --node-taint CriticalAddonsOnly=true:NoExecute This should do the trick :)

  • @soubaneimane1814

    @soubaneimane1814

    3 жыл бұрын

    @@CloudVersityOfficial Thank you for the answer, i get it know.

  • @3rdman99
    @3rdman992 жыл бұрын

    Is the process in the video only meant to work with linode VPS's, or should it work with google cloud VPS's as well? I I'm not sure why, but the process is not working for me with VPS's on google cloud. After installing ingress-nginx, "kubectl -n ingress-nginx get svc" is showing internal IP-addresses on the column "External IP" instead of the external ones. The VPS's have the port 80, 443, 6443 already open though. Did anybody have a similar problem? I checked the yaml file for installing ingress-nginx, and I couldn't find anything obvious.

  • @CloudVersityOfficial

    @CloudVersityOfficial

    2 жыл бұрын

    Good question :) I ran into similar problems with AWS, Azure and GCP, that's why I like to use simple cloud providers like Linode for these kind of demos because they are easier to handle. The big cloud providers will give you a fake public ip address which seems to not be know by your actual VM. Just check it with "netstat -i" or similar. They just get NATed down the road until it hits your VM in their "private" network. This is just an assumption, I'm not 100% sure if this is a correct explanation so take it with caution. However there is a fix. You need to manually edit the ingress nginx svc "ingress-nginx-controller" and manually add spec.externalIPs: [] your public IP. A "kubectl -n ingress-nginx get svc" should now update and also list your public IP besides the private one. You can now proceed with the demo. I also updated the the ingress by adding the "spec.ingressClassName" which is necessary since v1.22. Cheerio.

  • @3rdman99

    @3rdman99

    2 жыл бұрын

    @@CloudVersityOfficial Thanks. I'll give it try later.

  • @3rdman99

    @3rdman99

    2 жыл бұрын

    @@CloudVersityOfficial Sorry a bit late, but.. I just tried what you suggested, and worked great! Thanks. This "problem" made me learn even more about kubernetes :) FYI, it looks like I needed to edit the services on both "ingress-nginx-controller" and "ingress-nginx-controller-admission", and add the external IPs on both. Cheers.

  • @CloudVersityOfficial

    @CloudVersityOfficial

    2 жыл бұрын

    @@3rdman99 Awesome!

  • @jananathbanuka4994

    @jananathbanuka4994

    Жыл бұрын

    Anyone found a better way of doing this without deleting any admission web hooks and editing service objects?

  • @blesswind584
    @blesswind5842 жыл бұрын

    Does it automatically generate tls for a k3s server?

  • @CloudVersityOfficial

    @CloudVersityOfficial

    2 жыл бұрын

    Nope, just installing k3s and any sort of ingress controller won't give you ssl certificates out of the box. Feel free to check out a video I made exactly about this topic :) kzread.info/dash/bejne/lpmAuZShYbWtqpM.html

  • @justinkim7202
    @justinkim72022 жыл бұрын

    7:19 dockershim will be removed from kubernetes version 1.23 and as a result, docker will not work as a container runtime from then.

  • @stephandannewitz7747

    @stephandannewitz7747

    2 жыл бұрын

    K3s is using containerd as a container runtime since a while. So no worries, everything in this video will still work :)

  • @justinkim7202

    @justinkim7202

    2 жыл бұрын

    @@stephandannewitz7747 Yes I'm aware. I was just making a comment at 7:19 because he said version 1.20.

  • @stephandannewitz7747

    @stephandannewitz7747

    2 жыл бұрын

    @@justinkim7202 Ahh - gotcha!

  • @whatthefunction9140
    @whatthefunction9140 Жыл бұрын

    Where to run these commands can be very confusing

  • @jananathbanuka4994
    @jananathbanuka4994 Жыл бұрын

    15:37 - Hi, how do you have the public IP's for EXTERNAL-IP? I get the private IPs instead. And also can you update this video with the newest versions? Thank you for your efforts and time

  • @CloudVersityOfficial

    @CloudVersityOfficial

    Жыл бұрын

    Hi there, I added a note a while back in the README.md Cheers :) gitlab.com/cloud-versity/rancher-k3s-first-steps#important-note-for-aws-azure-gcp

Келесі