text
stringlengths
0
1.8k
[2590.60 --> 2596.76] K3S specifically because I wanted the CD part. I wanted something to pick up my finished Docker
[2596.76 --> 2602.84] containers and spin up the new version. That's essentially why I wanted to set that up to have
[2602.84 --> 2611.72] a very, very lightweight approach to what Kubernetes can do. The thing is, I don't see sort of keeping the
[2611.72 --> 2620.76] load balancer up to date or keeping certificates up to date as that complicated of an endeavor with
[2620.76 --> 2627.80] sort of current baseline tools like Let's Encrypt. So I wouldn't bring in layers to solve them.
[2628.60 --> 2635.00] It could be a bash script. It could be some fairly tightly specced tool. So for example, in Elixir,
[2635.00 --> 2641.72] there is a fantastic library by Sasha Jurich, which is called Site Encrypt, which will simply do the
[2641.72 --> 2647.08] Let's Encrypt dance for you if you configure your Phoenix app to use it. So when you start your
[2647.08 --> 2653.16] application, it checks, do we already have certificates lying around? I'll use those. If not, I'll talk to
[2653.16 --> 2660.76] Let's Encrypt. We'll shake hands. I'll get some certificates. And now we're certified. And with that,
[2660.76 --> 2666.20] to some extent, you might not even need Nginx at that point. I bet you would probably be able to
[2666.20 --> 2672.20] serve changelog with the previously mentioned SQLite performance of like 10k reads a second.
[2672.84 --> 2678.28] You were talking about terabytes and that's like the MP3 files, right? So file serving is one of the
[2678.28 --> 2686.20] places where I would typically reach for sort of proprietary cloud stuff like S3 or Linode Object
[2686.20 --> 2694.68] store or one of those because it just solves a lot of the like, okay, I want to have some redundancy
[2694.68 --> 2702.92] in this. I want to be able to scale it essentially arbitrarily. For file serving, I would typically use
[2702.92 --> 2708.92] a service like that. Just it's super annoying dealing with large drives and RAID. So I'd rather not.
[2708.92 --> 2714.28] So pragmatism, I don't think you should like peel everything off, but I'm also not sure like,
[2714.76 --> 2720.44] when do you actually need a load balancer? Having Nginx in front of your app can be very nice
[2721.80 --> 2727.16] because it allows you to do things like, oh, actually we're down for maintenance right now.
[2727.16 --> 2732.12] I still want to show something nice to the user or pointing to different instances that you're
[2732.12 --> 2737.64] starting up or whatever. But there's also the potential risk of your Nginx being
[2737.64 --> 2746.12] misconfigured or less well configured than your application and actually being a bottleneck
[2746.12 --> 2752.12] to your application. So I've seen that happen too. Typically, I would set something up with Nginx.
[2752.68 --> 2758.84] But also one of the things with Kubernetes is all this, like any node can go away at any time where
[2758.84 --> 2766.20] we're on very moving ground cloud infrastructure. We only use what we need, but you always need some.
[2767.08 --> 2774.28] So usually you're at a base level, like we have these instances up constantly. At that point,
[2774.28 --> 2780.92] I'm like, but do you need a cluster of three instances running the actual Kubernetes and then
[2780.92 --> 2788.04] like an app instance and a DB instance and like a load balancer instance? Or is this like one
[2788.04 --> 2792.68] application instance and one database instance? Would that do?
[2792.68 --> 2797.88] I think it would. And if you look at changelog at its core, that's exactly what we have. We have
[2797.88 --> 2802.76] the application and we have the database, single instance PostgreSQL. There's a great story how we
[2802.76 --> 2807.80] used replicated PostgreSQL and how that was the cause of a couple of downtimes. I think we cover
[2807.80 --> 2809.88] that in the episode one. Yeah.
[2809.88 --> 2815.08] A different story. And CockroachDB, that's something which I definitely want to try out.
[2815.08 --> 2820.84] Distributed PostgreSQL with a PostgreSQL compatible wire format. That's a very interesting one to try
[2820.84 --> 2827.88] out for sure. It's on my list. But I think what I'm hearing, going back to what you were saying,
[2827.88 --> 2835.72] is that for you, getting started with Kubernetes seems very complicated for a value that isn't very
[2835.72 --> 2841.48] clear. Like what is the value proposition? A lot of the things that you can do today,
[2841.48 --> 2849.08] I mean, does Kubernetes make them any different? And maybe the answer is no, from your perspective,
[2849.08 --> 2854.60] right? You're saying like, let's just use a cron job. In my mind, I think this is where I wish we had
[2854.60 --> 2859.00] more time to dig into this. So what I'm proposing is a follow-up because we will run out of time.
[2859.00 --> 2864.68] But there's so much more. So there's so much more to like, for example, the monitoring,
[2864.68 --> 2868.68] the shipping of logs, like all those things. And you have to configure them somehow. Then you have
[2868.68 --> 2875.00] to worry about OS patches, whichever host OS you're running. That is not an issue when you're running in
[2875.00 --> 2881.56] the context of Kubernetes because it's just your container, right? And you don't care about the node,
[2881.56 --> 2887.24] the worker node that runs the kubelet, that runs like the Kubernetes infrastructure, so to speak.
[2887.24 --> 2892.68] When it comes to Nginx, you don't install Nginx. You have ingress Nginx, which is a component
[2892.68 --> 2899.00] that exposes certain CRDs, custom resource definitions. And it's more like it implements
[2899.64 --> 2904.92] ingresses. Now, what is an ingress? Do you care about it? Well, you do because you need to know
[2904.92 --> 2912.28] how to configure it. But beyond that, how that maps to a Nginx concepts, that's abstracted away from
[2912.28 --> 2916.84] you. And you have like this self-discovery service, and it's all just happening behind the hood.
[2916.84 --> 2920.68] And you're right, it feels a bit magical, but it's no different to a framework. Like,
[2920.68 --> 2925.80] for example, if you use Phoenix. But that's the whole thing. See,
[2925.80 --> 2932.12] Phoenix is a fairly explicit framework. It has a few things that feel a bit magical.
[2932.12 --> 2937.72] Yes. But it is quite explicit about what everything does.
[2937.72 --> 2939.32] And Kubernetes isn't.
[2939.32 --> 2947.40] Yeah, it's not the impression I'm getting. But what I see when you're bringing in something like
[2947.40 --> 2952.52] Kubernetes, you're placing a lot of abstractions in place, and you're going to be working with those
[2952.52 --> 2959.24] abstractions. Those abstractions are still doing all of the things under the hood. And you need to be
[2959.24 --> 2966.76] aware of how they do those to be able to do it gracefully. Most of the use cases and most of the
[2967.96 --> 2975.40] the way you want to work with infrastructure should be ideally enshrined in how Kubernetes handles this.
[2976.20 --> 2983.80] But I don't feel like you can just say, okay, but now I don't have to care about this. Still have to care
[2983.80 --> 2993.48] about sort of updating Linux. You still have to care about how your search are propagated, or you could
[2993.48 --> 3001.32] get kicked off of let's encrypt or there's a lot of automation, but it's also very generalized. So
[3002.20 --> 3009.00] this is a thing where I think Kubernetes ends up being a bit over, I wouldn't say it's over-engineered.
[3009.00 --> 3015.16] It's a, it's don't repeat yourself taking quite far. And that's the correct move for some cases.
[3016.12 --> 3022.36] For example, you'll see an enterprise software, things are often very generalized and the software
[3022.92 --> 3028.28] is generally not that tight to work with. It's, it's usually a little bit annoying and a little bit
[3028.28 --> 3034.60] too much. And that's sort of the experience I'm, I'm getting from everything I see and hear about
[3034.60 --> 3039.88] Kubernetes. It, it tries to solve everything and I don't need my everything's solved.
[3041.88 --> 3047.16] So there is this opposite direction. I can take things in when working with Erlang Elixir and the
[3047.16 --> 3054.28] Beam, where the Beam, which is meant to handle sort of high availability, high reliability,
[3054.28 --> 3060.12] concurrent distributed systems. And I can bring all of my application concerns in there. It's like,
[3060.12 --> 3068.60] do I need an SSH server? Well, they have one. Do I need to talk to DNS? Do I need to do DNS? Yeah,
[3068.60 --> 3074.76] there's probably something in there for that. And that's, that's a very rare runtime that you can,
[3075.72 --> 3081.88] that you can lean on to, to do that kind of thing. But let's say, for example, shipping updates to your
[3081.88 --> 3087.00] app, the Beam can hot code update your app while it's still running without ever taking it down.
[3088.20 --> 3094.36] That's a little bit trickier to use than a lot of other ways. It's not like bringing your container
[3094.36 --> 3101.08] down and then bringing up another one, but it's definitely a capacity that's, that's there. And I
[3101.08 --> 3107.64] think like a Beam application can handle like everything that I need to get done, but also
[3108.60 --> 3115.96] the 99% case or the 90% case for small products and SaaS. Like if you need a bit of observability,
[3117.00 --> 3123.32] you have, for example, live dashboard, which gives a baseline of observability with no effort,
[3123.32 --> 3129.16] or you install something like Promex and then you need to have Prometheus and Grafana stood up
[3129.16 --> 3134.60] somewhere. Then you're starting to get a little bit more infrastructure or you use the cloud offerings.
[3134.60 --> 3140.04] And I think that's sort of always what it boils down to. Like at a certain point, you need more,
[3140.04 --> 3146.44] more visibility into the details. Okay. At a certain point, you should probably start looking at
[3146.44 --> 3152.20] installing something to give you that. But Kubernetes is installing all of it at once.
[3153.08 --> 3158.92] And you have to care about search. You have to care about the DNS details. You have to care about the
[3158.92 --> 3165.80] ingress. You have to care about all of it. And I think the, both the barrier and sort of the
[3165.80 --> 3172.20] maintenance cost of it is something I wouldn't choose to take on in lightly in any project.
[3173.48 --> 3178.20] Because I think it's too, typically too early for Kubernetes. And I'm thinking it's probably too
[3178.20 --> 3185.08] early for Kubernetes in most projects before they're like at an international scale. Like if you need
[3185.08 --> 3193.00] high availability across many regions and time zones, that's probably a good reason to use Kubernetes.
[3193.00 --> 3200.52] But I also realized like, if you spend a lot of time working with Kubernetes, setting it up might not be
[3200.52 --> 3210.04] that much effort. I'd rather code a fairly custom sort of deployment setup that I find explicit and simple,
[3210.04 --> 3219.48] than lean on something I understand so poorly, and which would take me years to have a good grasp of,
[3220.52 --> 3221.72] which is Kubernetes.
[3221.72 --> 3227.16] I think there is a lot of, well, okay. So first of all, there's simplicity and complexity,
[3227.72 --> 3232.44] and the other way around. But in this case, in Kubernetes, it's complex, but it's also simple,