text
stringlengths
0
1.8k
[4456.90 --> 4457.52] So, this succeeded.
[4458.46 --> 4459.62] What are we seeing now?
[4459.62 --> 4467.54] We are seeing that 42 seconds ago, a new LKE 2021-1217, by the way, it's the 17th of December
[4467.54 --> 4468.66] when we are recording this.
[4469.50 --> 4474.44] It just uses the current date when this new cluster has been created, or it's, you know,
[4474.46 --> 4476.04] it's asked to be created.
[4476.04 --> 4481.40] So, if we go to the, where do we have it?
[4481.52 --> 4481.96] Linode.
[4482.92 --> 4488.70] And if we go to our Kubernetes lists, we see a new cluster, which is Kubernetes version 1.22.
[4489.24 --> 4489.76] Nice.
[4490.42 --> 4494.14] I'm wondering, could it be our new production cluster for 2022?
[4494.14 --> 4496.40] If you could see me, I'm winking.
[4496.76 --> 4497.50] Yes, it will be.
[4498.66 --> 4505.86] 1.22, Kubernetes 1.22, the first version of our production 2022 Kubernetes cluster.
[4506.36 --> 4506.90] This is it.
[4507.78 --> 4509.72] Because it's ready, it's synced.
[4509.90 --> 4512.66] We have the external name, which is the, which is the ID.
[4513.60 --> 4514.68] The instance has booted.
[4514.78 --> 4515.24] Great.
[4515.60 --> 4515.96] Okay.
[4516.20 --> 4517.02] So, did it work?
[4517.02 --> 4521.74] Well, let's try make a cross-plane LKE kubeconfig.
[4522.90 --> 4525.76] All these, by the way, are in our repo.
[4525.92 --> 4526.80] You can check them out.
[4526.96 --> 4529.34] Actually, do you want to tell us what happened behind the scenes?
[4529.48 --> 4531.32] Like, how were we able to do this?
[4531.68 --> 4531.86] Yeah.
[4532.78 --> 4536.86] So, the cross-plane has this notion of connection detail secret,
[4537.24 --> 4543.36] where it stores all the sensitive information you need to use that resource, if any.
[4543.36 --> 4548.16] For example, we see that, like, you know, mostly in Kubernetes clusters,
[4548.58 --> 4552.38] database instances where you have, like, a password or some other details.
[4552.56 --> 4552.64] Right.
[4553.06 --> 4557.88] And not in others, for example, VPCs, where you don't need any token or something to connect.
[4558.90 --> 4566.56] So, here, what we see is that TerraJet does this automatically using Terraform's TF state
[4566.56 --> 4571.86] and exports it in its secret.
[4571.86 --> 4578.68] And then we have added a custom configuration that will get that secret.
[4578.84 --> 4580.80] You see the attribute.kubeconfig.
[4580.96 --> 4584.86] That is automatically put here, taken from state.
[4585.08 --> 4592.20] But the problem is that LENET Terraform provider actually base64 encodes the kubeconfig.
[4592.20 --> 4598.54] So, you've got, like, you know, secret, base64 encoding, and then another encoding on top of that.
[4598.82 --> 4603.18] What we did was to provide a custom configuration for TerraJet,
[4603.64 --> 4611.58] which takes one field from attributes and base64 decodes and puts it here,
[4611.76 --> 4613.76] which makes it ready to use right away.
[4614.06 --> 4620.58] With, like, you know, kubectl or other provider helm or provider Kubernetes controllers.
[4620.58 --> 4625.44] So, while we can get the kubeconfig locally,
[4625.86 --> 4630.16] and then we can use, like, kubectl or kubectl, whatever you want to call it,
[4630.26 --> 4634.18] and use that kubeconfig to target that cluster,
[4634.42 --> 4642.48] what we may want to do is let Crossplane provision other things inside this cluster
[4642.48 --> 4646.82] so that we wouldn't necessarily need to give this kubeconfig away.
[4647.00 --> 4648.44] It stays within Crossplane.
[4648.64 --> 4649.72] You know, it's all there.
[4649.72 --> 4654.12] Crossplane has it for it to be able to provision other things inside of this cluster.
[4654.44 --> 4658.76] And maybe this is the path where I lose access to Kubernetes clusters.
[4659.50 --> 4660.04] Is that it?
[4661.56 --> 4665.32] Like, it's more difficult for me to just, like, run commands against them.
[4665.64 --> 4669.66] The idea being that this could be, like, a fully self-automated system.
[4670.00 --> 4670.80] It creates itself.
[4671.02 --> 4672.96] It provisions itself with everything it needs.
[4672.96 --> 4677.40] It pulls down all the bits, including the application, the latest version of the changelog app,
[4677.74 --> 4678.50] and it just runs.
[4678.64 --> 4681.06] It updates DNS because it's like a self-updating system.
[4681.14 --> 4686.54] So, this is one step closer to a self-updating, self-provisioning system.
[4686.90 --> 4689.30] And that is a dream which I had many years ago,
[4689.30 --> 4691.96] and I'm one step closer, and that makes me so happy.
[4692.28 --> 4692.50] Okay.
[4692.86 --> 4698.46] So, we have the kubeconfig locally, and I'm not there yet in that dream world.
[4698.56 --> 4701.88] So, I'm still putting in the kubeconfig, pulling it down locally,
[4701.88 --> 4705.62] and now going with canines targeting the new cluster.
[4705.62 --> 4709.90] And what we see is that it's just like any regular cluster.
[4710.06 --> 4710.48] There it is.
[4710.66 --> 4711.58] Just the default pods.
[4712.14 --> 4713.64] Four minutes ago, they were created.
[4713.90 --> 4715.60] If we look at the node, it's the new node.
[4715.70 --> 4717.84] It's version 1.22.2.
[4718.10 --> 4721.78] So, the latest Kubernetes version on Linode currently.
[4722.34 --> 4726.76] And I'm wondering what is going to happen if by accident,
[4727.16 --> 4728.20] and I'm doing air quotes,
[4728.34 --> 4731.66] if accidentally Jared deletes the cluster.
[4733.24 --> 4734.24] I don't know, Jared.
[4734.34 --> 4735.36] I just gave an example.
[4735.36 --> 4738.96] You know, like we do crazy things together all the time.
[4739.10 --> 4742.02] So, you know, you're like the first one when I'm thinking about someone
[4742.02 --> 4744.84] deleting some changelog infrastructure.
[4745.12 --> 4748.18] So, let's just click this delete button.
[4748.44 --> 4749.58] Oh, pretend I'm Jared.
[4749.70 --> 4750.28] What is it like?
[4750.36 --> 4751.72] No, I don't recognize this cluster.
[4751.80 --> 4752.62] Let me just delete it.
[4752.66 --> 4753.72] It's just extra resource.
[4753.82 --> 4754.76] So, let's delete the cluster.
[4755.08 --> 4757.78] And yes, I confirm I want to delete it.
[4758.24 --> 4759.20] And the cluster's gone.
[4759.74 --> 4762.54] And luckily, I deleted the correct cluster.
[4762.60 --> 4764.02] I haven't deleted our production cluster.
[4764.02 --> 4766.00] But if I had deleted our production cluster,
[4766.46 --> 4767.94] I mean, good luck setting everything up.
[4768.00 --> 4769.86] There's like a lot of stuff to do, a lot of steps.
[4769.94 --> 4773.00] And yes, we have like a make target, which puts everything together.
[4773.34 --> 4775.12] And, you know, it's okay.
[4775.26 --> 4776.90] But it's not as good as it could be.