We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
Analysis Summary
Worth Noting
Positive elements
- This video provides a realistic look at the iterative nature of infrastructure-as-code, specifically showing how to debug Terraform provider issues and Talos boot sequences.
Influence Dimensions
How are these scored?About this analysis
Knowing about these techniques makes them visible, not powerless. The ones that work best on you are the ones that match beliefs you already hold.
This analysis is a tool for your own thinking — what you do with it is up to you.
Related content covering similar topics.
Installing Proxmox on a Home Lab
Heavy Metal Cloud
Create a Container Registry, using Twuni
Heavy Metal Cloud
Kubernetes (k3s) for Shared Services
Heavy Metal Cloud
Stop Using Docker. Use Open Source Instead
DevOps Toolbox
Transcript
So today we are going to be working in the Proxmox world. We are going to be setting up a Kubernetes cluster on top of Proxmox. What is Talos? Why does that sound familiar? Talos.dev. The Kubernetes operating system. Set up a Talos cluster. Go straight to the docs. Should we use Talos? Two hours later. All right. So chat has decided what we're going to deploy Kubernetes cluster with Talos. Okay. So the overview is we want to find a simple approach to deploying Kubernetes to our selfhosted Proxmox infrastructure. So what do we need? We're going to need three instances. We're going to need a Kubernetes installer of some type. How do we deploy instances? How do we deploy Kubernetes? How do we deploy Kubernetes? I'll explain. We want to use Talos to deploy our cluster for easiest setup and management. Because this is a specialized system, we need to determine how to deploy instances with automation. I would put this in how do we deploy instances to properly set up a Talos VM with all the requirements of a normal assisted uh machine. We will need to do the following to get the proper ISO. Navigate to Talos image factory. Select cloud server. Select latest version. Select no cloud. Select desired machine architecture. Keep this page open and download the ISO. So, we're just doing what we've already done. And I'm going to upload that mama jama. So, now we're going to step away from this. So, we've got Talos ISO. Now, we need to do infrastructure as code. I'm going to let you decide which should we use, Palumi or Terraform. Two hours later. All right. Well, the people have spoken. We're going to do get init prox.getit. That means we're going to create a new repository. Basically, what this provider is telling me to do is is to add a new role, add a new user, and then add a role to that user. We are going to use the CLI approach, and here's why. It looks like they are doing something a little specific. Now, I am going to change the command slightly, but we're going to follow basically what they're saying. We're going to go like this. We're going to copy and create our RO. There's our RO. Here's our user. And then here's our RO association. There we go. Okay. So, now if I go to users, there's our RO. Terraform proxmox. Where's our users? There's PVE. Hit permissions. There it is. Yeah. All right. So, let's keep reading on. So, it wants us to export some values. So, we'll say touch.m for right now. Now we'll just create ourselves a nice little M file. So user password touch main.htcl. Paste this in. So this should be r 610 alt4.domains new file version.htcl. I have to add the provider. Oh, it's TF. It forgot. So let's do module. We'll just create a module for Kubernetes. And then main.tf. And we'll get rid of all this. Uh, Talos01 6101. No cloud AMD 64.Oo. I want dis control as well as CPU control. Corores equals 2. You know what? We're kind of like okay on RAM. So, we'll we'll give them 4 gig. So, we want to make sure the network block is in here as well. Bridge. Network should be good. RAM should be good. CPU cores should be good. Oh, hard disk. That's right. I want to set the size of the hard drive. So, I should be able to do like 100g. Here's where it gets interesting. So, we're going to use the console for now. So, I'm not going to use cloud in it or anything like that for this at least yet. I'm going to make a couple of little variables that are helpful. So, I'm going to say Talos nodes Talos01. Now the reason why I'm doing this is because I'm basically setting up automation so that I can easily modify these VMs if I want to and so that I can also iterate over these directly. So I'm going to say for each local Talos nodes we will call this Talos. We can even just do it like this if we really wanted to just to make our lives simpler. And then I should be able to do like this and then each key like this. That is actually kind of nice because now what I'm doing is I'm basically saying each Talos node can be assigned directly to its target node equivalent. However, I'm not going to do this because I know that there's another problem I could run into, which is when I want to add more Talos nodes and I don't have the ability to assign it to like a six, right, or whatever else. So, here's what we'll do instead. We'll just start using this and say target node R 6101. And then we'll do the same thing for here. This will make it so that in the future if I want to add more Talos nodes then I can just say which nodes that those are on. So the talos nodes then this just becomes each key and then this becomes each value.target node. Let me add my module module Kubernetes source module Kubernetes to CP01. I figured control plane nodes and worker nodes are the same. All right, chat. Let's try creating our VMs. Disk conflicts with disks. So, I believe we would do this vertio and then like this vertio zero and then we do this. Oh, this is scuzzy. Okay. Well, in that case, we'll just use scuzzy. Let's try a plan. Damn it. Storage required but was not found and slot is not expected here. So, we're looking for storage. I think the storage here is virtual cuz that's what I called the storage. Let's try this again. Hey, there we go. Nice. Okay, cool. So, should we just should we should we ship it? So, I'm going to go to summary here. I'm going to do this on the right. I'm going to do this on the left. And then I'm going to hit apply. Create me my VMs. Hey, there's one of them. Oh, we have a problem. It's all they're all getting created on the same node. That's probably because my dumb forgot to change the node. But this is dope. That's awesome. That happened really fast. Yeah, I forgot to change the node cuz I'm a dummy. All right, there we go. So, one small change. We'll do another Terraform plan and then we'll do an apply. And let's see. Let's see what happens to these other two nodes. They're going away. Oh, it's migrating it. Holy crap. That's crazy. I wasn't expecting that. It's actually just migrating it instead of deleting it. Okay. All right, Proxmox, I see you. So, I did make one small little oopsie, which is I accidentally provisioned the VMs all to the same node. So, I changed the Terraform configuration to migrate them to the appropriate nodes. We should be able to go to that first node cuz Tal01 did start. Oh, we failed. Oh, we're not even booting. Let's look at hardware really quickly and see what we might have missed. So, we didn't get the CD for some reason. That's weird. CDROM ISO. Okay, so we missed something. Let's go to local. So why did we not get a VM use disk local? Oh, maybe we need to set the storage local ISO image name.iso. Oh, yeah, you're right. Yep, you're right. Nice. Well done. Well done. Good catch. So to fix that problem, we actually want to go here and we want to do this storage pool. So that's our problem. So create all virtual machine resources in terraform. So basically after all the machines are up and running we need to initialize the towels cluster by generating machine configurations. This will be for the first node. Uh so generate a machine configuration for the control plane IP node. So then we'll just do IP address like that so that we know to change it. So then using the control plane generated YAML you can now apply this. Okay. So then what we would do is we would say apply the configuration to the node. We're just going to get rid of these VMs really quickly. So then we're going to do a Terraform plan. The reason why I want to do this is because I want to create Verio discs. I don't want to create SCSI discs to get better performance. Can control plane nodes not run containers or should I go hard and create sticks? So a a control plane node should be able to run containers as well, right? So yeah, I guess what we can do is we can just create I tell you what we'll do this. We'll create our control plane nodes and then we'll create three worker nodes. But I'm not going to create the worker nodes just yet. I'm just going to do the the main part. So let's do terraform plan and then terraform apply. Hey. All right. We're in maintenance mode. Look at that. So I'm going to create highly available control plane nodes with the QMU guest agent as well. So I've already got my command right here. We're going to copy this. We're going to paste this 6443 output Talos. Uh we'll just say we'll just call this Talos install image factory Talos. Looks good. Okay. And run. And I want to look at this really quickly. So basically it creates you a nice little Talos directory. And in it you get a control plane. with a bunch of configuration. Oh, wow. This is a lot. Installer registries, node labels. Oh, that's pretty cool. This is like a full-on Kubernetes cluster configuration. I like this so far. Pretty impressed with Talos. Now, we need to apply our control plane node. So, then I'm going to go back in here. Tell us apply insecure nodes. Bam. Wait, is that it? Oh, hey, look. Okay, so it did something because now the machine's rebooting. I actually am starting to dig Toss. Oh, wait a minute. This went right back into Is this in maintenance? Oh, it's in maintenance still. So, what's happening right now? At some point, it said couldn't find system disc. If installed correctly, it would have complained by now that it's installed, but it's running from the ISO. We could set boot order. Boot order. Yeah, here it is right here. We're thinking that it's vertio zero and then IDE2. Let's do this. So, boot from the disc first, then from the drive, then if anything, do the network. Let's see what happens. We should boot back into Oh, we didn't boot into it at all. There's something we're missing. Boot order, vertio, net0ero, and then IDE2. Oh, it doesn't. It swapped them. I think we need to do a couple of things. I think we need to make sure this boot order gets set properly. Let's do terraform destroy. Yes. Just want to destroy these VM really quickly. We've got our order set to vert IO Z IDE2 and then net0ero, but for some reason it may not have updated the way that we wanted it to because it seems like it did vert and then net0. We'll do another plan and apply. Let's see what kind of VMs we create. There we go. Vert.io ID 20 and net zero. Okay, perfect. That looks like what we want. We did in fact boot into the VM this time. That's good. So, we're back in maintenance mode. Let's try this again. Let's delete our tallow stuff. Yep, looks good. And then 172. Okay, so let's see if it boots into it now. No system disc found. Nothing to revert. Yeah, it's just going right back into the ISO. I don't know why, but I I don't think vertio is working. If I go to Nomad Hardware, Vert IO scuzzy single. Oh, controller. Here we go. Okay, this is in the top level block. LSI. Oh, I see. like this equals. We'll set it to single. Let's see if this works. So, we moved over to scuzzy single to match our other one. We're using a vertio disc. Another destroy. Looks good. All right, let's go to console. Get discs. Let me try that just to make sure. VDA mother. It is working. We do see it and we have what we want. There we go. Install disc. Dev VDA. Well, that's one of the things we needed. We'll see whatever else we needed, but that's one of the things that we needed. Apply. Let's see if we get it this time. Oh, it seems to be doing something. Hey, health check successful. Let's go. Healthy, baby. Woo. Here's my next follow-up question. Now, if I want to add the other two, does that mean I just change this address nodes? I'm guessing so. I'm going to go ahead and guess. This is where the DevOps part comes in. That's fun. Which is just guessing and see what happens. There we go. All right. And then we'll go in here. We'll say uh to all control plane nodes. So we haven't bootstrapped the cluster yet. Then let's do this on the third node. All right. There we go. It sees three machines healthy. All this stuff looks good. So now what I'm going to do is after all control plane nodes are set up, it's time to bootstrap the cluster and then bootstrap. Okay. And then we can retrieve the coupube config. Okay. So let's do all of this. So we will export this config node. Okay. And then tallow ctl bootstrap. Are you ready? Here we go. is happening chat. Health check successful. Okay. I don't know what's happening. I don't know what I just did. Do I just wait now? So, how do I know when this is like done? Stage. I guess the stage maybe changes. It says that it's waiting for the extension qmu guest agent to be up. And I'm not seeing any output yet. So, maybe that's what we're waiting on right now. Got to have the option on the VM. Oh, disabled. All right, back to one chat. Destroy. Let's do it again. It's okay. It's okay. This is why we automate things. I set it to zero. Mother Terraform enabled. There we go. Okay, cool. Come on, baby. Boot up. Listen to your master. I got to delete the to directory. Gen config. There we go. Remember, we got VDA and then apply. Okay, so we should be good now. Healthy. Now, let's try bootstrapping. Let's see what's happening. Console. We're running. Let's do towels cube config. Let's get our cube config. Cube patrol get node. There we go. We're up. We did it. Should we provision some workers now? Just because why not? Yeah, first try, bro. First try. I don't know what you're talking about. First try. Okay. So, let's do this. Let's go to local. And I want I want three worker machines. So, then we'll do this control worker terraform plan. Terraform apply. Give me more machines. I want more nodes. Okay. So, create a worker node. After bootstrapping is complete, add all additional worker nodes. We'll copy this. So then we want to go here. Worker IP talos worker. Hey, look at this. Worker worker worker control plane. Control plane control plane. We did it. We done did the thing. I think we're in a pretty good spot. So we created a document called deploying Kubernetes on Proxmox. We said what problem are we trying to solve? What are our requirements? How do we deploy instances? We needed to set up our infrastructure as code. Let's add a small little call out here which is next steps would be to automate the entire Talos setup process with a infrastructure as code provider. So, if you guys are curious in setting up Talos on your Proxmox cluster, yeah, we were able to go through that dock and pretty much successfully do it as well as get some automation out of it, too. If you guys are curious about Talos, it is talos.dev. Also, if you're new to the channel, would love to have you in the Discord. If you ever have any questions or anything like that, ask the wonderful people in there. I had a blast doing this today. But yeah, dudes, thank you so much. I had such a great time. Have a good one. Bogus.
Video description
Walk through getting started with Talos Linux for Kuberentes using Terraform automation. If you want to up your self-hosted containers game, this video is for you. Join the Discord: https://discord.gg/7AteQJc Watch live on Twitch: https://www.twitch.tv/thealtf4stream Follow on X: https://x.com/thealtf4stream #devops #homelab #programming #softwareengineering #kubernetes #proxmox