text stringlengths 7 369 |
|---|
[1197.22 --> 1202.20] so you can see just how good Linode is for yourself. Go and grab yourself that $100 credit |
[1202.20 --> 1209.06] and 60-day free trial over at linode.com slash SSH. That's linode.com slash SSH. |
[1211.36 --> 1217.78] Now, I think the thing that I found you for first was Kubernetes content. You were doing a bunch of |
[1217.78 --> 1225.60] stuff with Rancher, I think, at the time and K3S. As an OpenShift guy, you know, at work, obviously my |
[1225.60 --> 1230.78] propensity is to use OpenShifty type stuff. But actually, I do like to try and keep my skills |
[1230.78 --> 1235.64] in the real Kubernetes world without a lot of the OpenShift magic that goes on with the rooting layer |
[1235.64 --> 1240.94] and all that kind of stuff. And so that leads me down the path of looking at K3S. And I always, |
[1241.08 --> 1246.90] always, always find myself in this dichotomy of, I want to have something at home to learn on, |
[1247.64 --> 1250.04] but my goodness, is this complicated and overkill? |
[1250.04 --> 1257.48] So, you know, it is. Well, it could be. But I ask, you know, what is overkill? Is overkill 40 terabytes |
[1257.48 --> 1263.74] of storage? Is overkill a V8 engine in your car? Is overkill, you know, half a terabyte of RAM? |
[1264.02 --> 1269.64] You know, what is overkill? So, you know, yeah, I've made a lot of K3S content and you hit the nail |
[1269.64 --> 1275.72] on the head. Like when I built my Ansible playbook for K3S, it was to solve a lot of the complexity of |
[1275.72 --> 1280.16] setting it up because there's a lot of complexity in just setting it up, let alone everything you |
[1280.16 --> 1286.80] need to know about Kubernetes later on. But I think K3S is a, one, it's a fantastic product. It's an |
[1286.80 --> 1292.88] easy, lightweight way, air quotes on lightweight, way to run containers on the edge. You know, with it, |
[1292.96 --> 1299.08] you get a full, mostly full Kubernetes API. And, you know, for a lot of things, it might seem overkill. |
[1299.08 --> 1305.94] Hey, I'm running one container of everything in my, you know, my Docker stack or Portainer or |
[1305.94 --> 1310.04] whatever you're using to manage your Docker containers. But what happens if you want to run |
[1310.04 --> 1315.14] two? What happens if you want to make sure that they're always up? What happens if you want to |
[1315.14 --> 1321.06] do that declaratively and, you know, create YAML for all your deployments so it's repeatable? |
[1321.28 --> 1326.18] How do you handle storage, you know, on your single node? Single node's pretty easy, |
[1326.18 --> 1331.96] but, you know, how do you handle it if you have more than one? And so, you know, Kubernetes asks |
[1331.96 --> 1336.92] a lot of those questions of containers and you're left to kind of figure it out. But for the most part, |
[1337.02 --> 1341.76] once you get going with it, I think, you know, like, like me, when I caught the DevOps bug or |
[1341.76 --> 1347.10] engineering bug or software development bug, you know, it's something that you can go really deep on |
[1347.10 --> 1352.42] really fast and maybe never come back from. It definitely is a lot of fun, but it, it, |
[1352.42 --> 1354.10] there's a lot of learning involved. |
[1354.10 --> 1359.24] I always find myself thinking, right, I've got two or three Raspberry Pis sat in the drawer. |
[1359.98 --> 1364.90] And the whole purpose of doing this would be to have a highly available, I don't know, |
[1365.26 --> 1370.20] Git server, web server, whatever it is, basic services like that. I don't think I would do |
[1370.20 --> 1375.14] things like Home Assistant in, in Kubernetes because it's, it's best suited as its own VM. |
[1375.36 --> 1380.88] And we'll just, we'll forget about that. But there are certain services in the, in my |
[1380.88 --> 1386.42] overall kind of self-hosting world that would be pretty cool. It, you know, at the moment I run |
[1386.42 --> 1391.58] everything on my storage server. So if, if a disk fails, I have to take that thing out and, and |
[1391.58 --> 1397.40] shoot it in the, no, I don't do that. I take the disk out and the machine's offline for an hour or two, |
[1397.44 --> 1403.26] or maybe longer. If I'm doing some data transfer, I will actually stop all the containers on that box |
[1403.26 --> 1406.52] so that nothing's reading and writing to merger FS and doing all that kind of stuff. |
[1406.52 --> 1414.42] And I find myself thinking in those moments, which admittedly is only once a month for a few hours |
[1414.42 --> 1420.78] at most, I think, oh, I'd be great if this was self-healing and that web service had just moved |
[1420.78 --> 1426.10] over here and its underlying storage had also replicated and also done all, and it's just those, |
[1426.40 --> 1430.70] all those extra thoughts of, well, but then I need to solve this problem and then I need to solve |
[1430.70 --> 1434.94] that one. And then I need a load balancer and then I need to replicate the storage and all that |
[1434.94 --> 1442.24] kind of stuff. So what's the lowest barrier of entry to a highly available Kubernetes setup in a |
[1442.24 --> 1447.18] home lab scenario? Oh yeah, good question. So, I mean, you hit the nail on the head with all the |
[1447.18 --> 1451.80] challenges you'll start to face. Those are the known ones. There are a lot of ones you don't know |
[1451.80 --> 1458.04] until you get into it, but the lowest barrier of entry, I think the minimum available, there's a |
[1458.04 --> 1463.20] couple of ways you can do it. With K3S, you can use etcd for your, your, your Kubernetes database, |
[1463.20 --> 1468.94] or you can use a MySQL database, which is external. At the end of the day, you need at least three |
[1468.94 --> 1473.60] nodes for Quorum for them to vote. But if you're using the MySQL version, you don't need Quorum |
[1473.60 --> 1480.44] because the MySQL database acts as your database. So you nodes don't need to vote or it is the tiebreaker. |
[1481.18 --> 1488.66] So how does that work? etcd is explicitly designed for Kubernetes, or at least that's the way it feels. |
[1488.66 --> 1493.06] I know it wasn't originally, but it's very lightweight. It's very good at maintaining |
[1493.06 --> 1498.38] Quorum and the performance at scale is excellent. MySQL, not so much. |
[1499.02 --> 1503.72] Yeah, no, I, I totally agree. So if you choose the etcd route, it's going to be very chatty, |
[1503.88 --> 1509.02] but highly available. It's going to be replicating all of the data across all of those nodes. |
[1509.28 --> 1515.14] It will have some kind of performance impact if you're using Raspberry Pis with microSD cards, |
[1515.14 --> 1520.88] probably not the best storage for something that reads and writes often. But with MySQL, |
[1521.20 --> 1527.12] if you have it there, you can run that anywhere. It becomes your state for where these nodes go and |
[1527.12 --> 1532.84] look up their state. And then your database for everything in Kubernetes. But I think the performance |
[1532.84 --> 1539.16] is good enough, good enough for nodes and good enough for K3S. I think otherwise they wouldn't |
[1539.16 --> 1545.20] have chosen it. I suppose I get caught up sometimes in, you know, thinking about this from my day job |
[1545.20 --> 1549.88] and thinking that I must do things properly. I must do it with etcd when actually probably MySQL, |
[1550.74 --> 1554.74] certainly from your description there, sounds actually like in some cases it might be a decent |
[1554.74 --> 1559.38] choice. So what do you do? Do you put MySQL on its, you know, let's say you've got three Pis running |
[1559.38 --> 1563.86] K3S. Do you then have a fourth that's just dedicated as a single node for MySQL? |
[1563.86 --> 1568.78] Well, if you're doing MySQL, you could do two nodes with a MySQL database anywhere in the |
[1568.78 --> 1571.92] environment that it can communicate with. It doesn't even have to be a Kubernetes node. |
[1572.12 --> 1576.36] So you can have two Raspberry Pis and then your MySQL database wherever, anywhere else, |
[1576.38 --> 1579.26] as long as it can reach, you know, MySQL over TCP. |
[1579.64 --> 1581.58] And how's the complexity of setting up that replication? |
[1582.28 --> 1585.60] You don't have to do anything. There's nothing you need to do. With K3S, |
[1585.72 --> 1591.64] all of that is obfuscated from you in general, like with etcd or MySQL. You don't need to know |
[1591.64 --> 1596.22] how to do that or how to set it up. Not saying that, you know, you might not have to troubleshoot |
[1596.22 --> 1602.50] it sometimes, but for the most part, it's pretty solid. I'm a huge fan of the etcd way because, |
[1603.14 --> 1607.72] you know, you can spin up nodes, add nodes. And I mean, you could do that with the MySQL version. |
[1608.22 --> 1612.74] More industry standard too. So if we come back to one of the original goals of learning, |
[1613.42 --> 1618.60] right, if you're doing things at home in a very custom way, you could argue that certain |
[1618.60 --> 1623.80] businesses and certain shops will have a huge amount of custom code. Certainly older, |
[1623.90 --> 1628.78] more legacy shops from, let's say, more than 15 years old, let's say, before the cloud was really |
[1628.78 --> 1633.00] a thing. They'll have a lot of on-premise infrastructure that you'll go and you'll read |
[1633.00 --> 1637.78] the wiki if they have one and you'll scratch your head and be like, why did you do it that way? |
[1638.42 --> 1641.06] Because 20 years ago, there was no other way, mate. That's why. |
[1641.78 --> 1642.64] Yeah, exactly. |
[1642.64 --> 1648.82] So, you know, there is that to contend with. If you think about doing the MySQL route is it's not |
[1648.82 --> 1654.84] an industry standard way of doing things, whereas etcd is. So, you know, you've got a few pies now |
[1654.84 --> 1658.40] running K3S with, let's say, etcd as the backend. What next? |
[1658.74 --> 1663.52] So the next thing I highly recommend doing is going and figuring out storage. Well, |
[1663.74 --> 1666.06] there's two pieces. It's choose your own adventure. |
[1666.20 --> 1669.52] Remember I said the terminal is the only video game I need, baby. You see what I mean? |
[1669.52 --> 1676.22] Yeah. So those are the two things. And I recommend people like figure that out up front. I know most |
[1676.22 --> 1681.20] people when they build a cluster, they don't even have K3S in mind and maybe they do, but they're |
[1681.20 --> 1686.20] more focused on the service that they want to run. They want to run WordPress or Ghost or Plex maybe. |
[1686.72 --> 1690.36] And so they're really focused on that. And sometimes I have to remind people, okay, |
[1690.64 --> 1694.70] before you do that, figure out storage and load balancing, because that's, that's tough to figure |
[1694.70 --> 1699.50] out. I would probably say figure out storage too, because almost every stateful, |
[1699.52 --> 1704.54] stateful applications. So stateful applications in Kubernetes are ones that write state or keep |
[1704.54 --> 1709.98] state in memory. But for ones that write to a volume to disk, you need to figure out storage |
[1709.98 --> 1715.66] and you can do the, Hey, put it all in NFS, but then you're taking, you know, you're taking this |
[1715.66 --> 1721.54] highly available service K3S and making it, you know, putting in a single point of failure, |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.