Todayâs conversation with Kelsey Hightower showed Gerhard what he was missing in his quest for automation and Kubernetes. The fundamentals that Kelsey shares will most certainly help you level up your game.
Oh, and we finally cleared where we should run our changelog.com PostgreSQL database đ
Kelsey Hightower: Yeah, I think we always have this desire as humans to aggregate things out of the sake of simplicity. If we put everything in the same configuration management tool, then it will be simple. But typically, when you look at that configuration management tool, thereâs all kind of if statements and weird logic and extensions that only the person who made that understands, and everyone just says âHey, donât touch it. Just use it as it isâ, and now itâs very brittle.
I think the thing that does make things simple are things like âHere is the frontend. The frontend has these components, and it retrieves this data from these imports. It doesnât retrieve this data from functions, it doesnât retrieve its data from Kubernetes. It retrieves this data from end points.â
[32:16] So now if youâre a frontend developer, you can have endpoints be anything for your testing purposes. I could just run endpoints on my laptop and serve mock data, and the site will behave as designed. So now I say my deployment target for my frontend could by my local browser, or it could be a CDN that will then serve it to billions of web browsers. Thatâs simple to understand. So now you say âWhat tool will I use to complete that?â Well, it could be as simple as my IDE, where I hit Save, and it just goes to staging automatically, because I know what the contract will be. When it gets there, itâs going to use a certain set of endpoints, and those endpoints are required to have data.
So now letâs move to the endpoints. Any one other team can create endpoints. You make a promise, endpoint.hightowerlabs.com is supposed to serve this kind of data, and this structure. And if you do that, then my frontend app, my mobile app, my watch, my smart washing machine - all of them will know what to do with that data. And even though that sounds more complex, itâs easier for everyone else to understand that thereâs going to be data returned from this endpoint. None of them need to know about Kubernetes, they just need to know what my contract is. You need these credentials to get this data, and I promise to keep it up 9.99% of the time. So now that we have these contracts, now I can go focus on my area and just assume you have your area.
So now letâs talk about deploy targets. Now, that API - we know we need DNS, and I could decide to point the DNS at Cloud Run, I could point the DNS to Kubernetes, independent. So I think these logical boundaries, these very clear contracts allow people to move very fast, because now weâve reduced the amount of coordination that we have to do in order to figure out what to do next. So as a developer, without talking to anyone on the endpoint team, I can just call Curl and see what data comes back, and I know what to do going forward. So now if I wanna use different tooling for the Kubernetes component - and think about this⌠You donât necessarily need to provision the cluster yourself. You could decide âIâm just gonna use GKE Autopilot, which will automatically scale the nodes across the regions based on what my application needs.â So my Terraform provisioning is âEnable Autopilot.â Thatâs it. No flags, no cluster side, no node pools.
And then maybe another tool takes off to manage things like deployments, deploying to that particular target. To me, that is easy and understand and explain to the relevant parties. And youâre right, if one person had to think about all of these things, weâd think they would have to actually learn a lot, but I donât think that is the case. When I context-switch, when I go to work, I work on a Chromebook. When Iâm doing personal projects, I work on a Mac. If I wanna play a certain video game, I do that on Windows.
Humans have no problem switching context when the rules are clear, once I make the switch. Itâs only when we start to muddy the waters by mixing too many concerns. If the frontend team is using Terraform in a way that doesnât actually make sense, then they get confused and now theyâre spending so much time battling Terraform, instead of just saying âSave in the IDE, run some tests, if they pass, deploy the new set of static files to the CDNâ, and be finished.