Building a 10-Node Kubernetes Cluster on Raspberry Pi & Ubuntu Server

preview_player
Показать описание
Have you thought about setting up your very own Kubernetes cluster consisting of multiple Raspberry Pi's? It's not as hard as it sounds, and in this video, I'll show you how to set it up. Although this video will show the process of creating a ten node cluster, you don't have to have 10 nodes - as long as you have at least two, you'll be all set. By the end of the video, you'll have your very own Kubernetes cluster that will be ready to go for my upcoming Kubernetes tutorial series.

*⏰ TIME CODES*
0:00:00 - Intro
0:02:32 - Getting Started
0:07:30 - Writing the SD Card
0:14:12 - Building the rack
0:28:22 - Initial Pi setup
0:40:03 - Installing Docker
0:59:59 - Launching containers

# Support LearnLinuxTV (commission earned)
📖 Check out Jay's latest book, Mastering Ubuntu Server 4th Edition. Covers Ubuntu 22.04!

🙌 Support me on Patreon and get early access to new content!

☁️ Support LearnLinuxTV and Set up your own cloud server with Akamai Connected Cloud:

🛒 Affiliate store for Linux compatible hardware/accessories (commission earned):

💻 Check out the Tiny Pilot KVM for your Homelab (commission earned):

# Links specific to this video
🐧 Wiki article (contains all the commands used in this video):

🐧 Components used in this build (commission earned):

🐧 Download Ubuntu Server for Raspberry Pi:

🐧 Download usbimager:

🐧 Also, check out my series on Docker:

# LearnLinuxTV Links
🐧 Main site:

🐧 LearnLinuxTV Community:

# About Me
🐦 Follow me on Twitter!

👨 More about me:

# Recommended evergreen videos:
💽 How to create a bootable flash drive for installing Linux

🐧 Understanding Linux permissions

🐧 OpenSSH Guide

📖 LVM Deep-dive:

🔐 How to better secure OpenSSH:

☁️ How to create a cloud Linux server with Linode:

*📘 FAQ*

#Kubernetes #K8s #RaspberryPi
Рекомендации по теме
Комментарии
Автор

I can't still believe that your high-quality tutorials are free. Would love to learn more about Kubernetes from your channel

themenon
Автор

You're a great teacher.
You have a sense for making advanced topics beginner friendly.

quietsyful
Автор

At last after many attempts, trying to follow a different tutorial series, I have five Pi-4s running in a cluster. What’s more I understand exactly what I’ve been doing and when the dreaded typo crept in, where it was and how to fix it.
A big thank you to you Jay👏

daverawson
Автор

Great video! I’m impatiently waiting on Amazon to deliver all the items and I will be building mine next week. Thank you for the detail in your video. I’m learning Linux, as well, and really appreciate your channel.

myuniversalblip
Автор

Thanks Jay for taking your time to teach us. I really value how much patience you've and your in depth material never assuming things. Moreover thanks for making this content available for us free of charge.

juanpaul
Автор

Nice vid man, this whole 10 nodes setup/config would be perfect candidate for Ansible to orchestrate - You´d run all the setup from one shell... and share the playbooks on your wiki.

rille
Автор

Thank you. I've been trying to learn Kubernetes for a few months, and I feel like I'm getting the hang of it, but one thing I've never been able to find is step-by-step how to install my own Kubernetes cluster on my own servers. Everything I've found either recommends a hosted service, which is not at all helpful for trying to learn how Kubernetes works, or is too high level, "you need to install several packages." So thank you!

aaronperl
Автор

Just FYI, if you add a '00:00:00 - Intro' line to the top of the time codes list in the description (minus the ' ' of course) then YouTube will add chapters to the video, which might make it easier for people to navigate.

OhItsAnthony
Автор

You're the MVD (Most Valuable Dude) when it comes to Linux . Thank you !

realdanbyers
Автор

Nice. (Especially the size of the cluster. Yes, there are bigger clusters, but there is a "too big" when you could simply go for 2+ normal computers. Yes, there are clusters with 4k cores. But no normal person needs that.)
Some ideas for improvement below.

This is quite easy:

There are tools to run commands on all servers in a list.
- You might want to have a test machine to run the commands just to be sure that you do not crash all nodes. (So e.g. run the command on node 1 and use the tool to run the update for all nodes and maybe the controller.)

You can add a second network over the same hardware interface - did this for a different purpose while using VLAN. (Ignore if you won't move the cluster to other people's networks.)
- While using the normal network to connect to the internet you can use the second network (with static ip addresses) to connect to the PIs easily,
- Biggest problem would be when you connect to a network that collides with the internal cluster network. (e.g. both use 192.168.123.x - but there are 255 other ip ranges that might be used for the network you connect to. So if you use a random number it should be unlikely to happen?)

These are harder, but quite nice in the long run:

You can add a proxy with cache for updates (when using apt / apt-get).
- You might want to add a disk to one of your machines. (That machine will download everything once and the proxy will distribute the data to all machines that use the proxy.)
- No problem with downloading everything 11 times and getting blocked. And you have more bandwidth for other things.

(You can add your own registry for docker.
- In this case the disk should be "huge". (Some updates should not be a problem for a while. But docker images... well...)
- Same as above. More bandwidth for other machines. And of course you could use that service for other computers as well. (Of course you will most likely need to download different images.)

You can install tools like Rancher in a VM on your desktop to manage the k8s cluster.
- The PIs are not powerful enough to host Rancher. And you do not need Rancher to be running all the time. But it is quite nice to have a UI for some things admins need/want to do?

...)

benjamin
Автор

Thanks for this video.
Very interesting! I am looking forward to you kubernetes tutorial.

joir
Автор

I think I learnt more in this one and half hour video than all the searches that I did in last few days! Thank you for the great content and presentation.

ritooraj
Автор

It would be great for you to give a lot of recommendations on things to run that would take advantage of clusters, and maybe even stuff like load balancing so you could put in one address and it just pops up no matter which it lands on

kenzieduckmoo
Автор

from Cuba ..thanks a lot Jay and please keep on your teachings

emiliojoserodriguezbejaran
Автор

Great lesson. I think now I understand the process. However I’m left feeling that you break the D.R.Y principal by provisioning each card separately. Might it not be more efficient to fully provision one card, without errors(!) and then use dd to clone the rest. Yes you have to change host name and hosts as well as the special case of the controller? What no Ansible! 😂

daverawson
Автор

Best tutorial on the youtube for the subject.
Totally Professional, Well-Explained, Couldn't be done better than this.

Which Zsh (terminal) theme is this you're using ?

mandeepmails
Автор

Hi Jay and greetings from Ireland. I followed your proxmox tutorial series and successfully set up a 3 machine cluster from old pc’s that I was told to scrap . My budget is very limited and I would need to cannibalise my proxmox setup. I Know all learning is good and I’m not asking for anything other than your opinion.
My question is this, “As you know both Proxmox and Kubernetes, which of the two would you say is the most flexible and worth devoting time to learn?”

I hope you get a moment to answer. Your videos are excellent. I can honestly say that everything I have been inspired to try from your channel the complete resources and information has been available. Keep up the great work.!

stephenlipton
Автор

You could probably Etcher instead of USB imager, that automatically erases your SD cards before writing your image. So you don't have to manually delete the partition table every time. Works on windows, linux and macOS..

anujdatar
Автор

Nicely prepared and well paced. Many thanks.

johnbrinnand
Автор

This is sooo cool! Thanks for making this video!! 😎 Also love the case!

JediOutcastBex