0:00 Welcome back. In the last video, there was quite a lot of talking, but we did cover the problem base, what Teleport is, and how and how it solves these challenges. So now it's time to get our hands on the keyboard and actually deploy our first teleport Cluster. By the end of this video, you will have a working teleport Cluster running on Kubernetes with TLS certificates and an admin user ready to log in. access the right way. Now before we start, let's talk about what you need in order to follow along. First, I'll be using kind Kubernetes and Docker to spin
0:45 up a local Kubernetes Cluster. Feel free to use Docker desktop or anything else that you wish. You don't need a cloud account so you don't have to worry about billing and all that other stuff. But if you do want to use GKE, EKS, anything like that. Feel free, Once we have a working Kubernetes Cluster, we're going to use the teleport helm charts to get things deployed. So that does mean that you will need access to the helm, CLI, and of course kubectl for actually talking to our Cluster. There's only one prerequisite and that is deploying cert Manager.
1:22 Now don't worry if you haven't done this before either. It's just one helm install away. So in order to get started, you can run the check prerequisite script that I will do now. So in the demo directory, if you close the repository, there's 01-check-prerequisites. That's just, that's gonna confirm you have kubectl helm and kind of course if you don't have kind, kind is our cluster, that is okay. So now that we have all of our tools installed. The first thing that we want to do is get our Kubernetes Cluster running. Here we have a kind configuration.
2:00 Now we don't actually need one for this really simple Cluster, but we may wish to expand this as we build out a highly available multi-node control plane and working node pools. Later, though we have kind cluster control plane and that is all. We've kept this very simple for the first demo. You will have a script, 02-create-kind-cluster. If you run this, it's just going to run the kind Cluster, create command or kind create Cluster. I can never remember the order using our config. We now have a Kubernetes Cluster, or at least we will have just one moment.
2:39 And it looks like we have our Teleport course control plan. Ready? We can run kubectl cluster-info. kubectl get pods, all namespace. This is our local Kubernetes Cluster configured for the current context. Perfect. All right, let's pop open and actually take a look at script three. This is going to give us our cert-manager cluster. Now all this is doing is adding the Jetstack. Why is it still Jetstack, uh, helm chart repository, and then running a helm install cert-manager. And the only thing we're actually gonna set is just that we want it to deploy the CRDs. Once cert-manager exists, it's actually not that useful until you provide an issuer.
3:29 Here we can have a self-signed issuer and the cert manager namespace. We can then create our certificate. This is our root certificate for our teleport instance, is going to use the certificate. And here we're just saying this is a certificate authority. We want to use this to mint new certificates and provide some scaffolding of the common name and secret name, et cetera. Once we have that, we can create a Cluster issuer, which the teleport will use as we progress through this demo. So a little bit of a certain manager work to be done, but it's all automated and available.
4:05 You can copy and paste or run these scripts yourself. So let's kick that off and come back in just a moment. Sweet. No, because I like to check our work. We'll run kubectl, get pods all namespace. We can see cert manager, we can see our web hook and our ca injector. This is the perfect setup for moving on to step four. So let's pop open 04. Now this is a pretty much noop, it's just going to help us understand our teleport value file for, or helm install next. So, but of course we could just run through this, fail directly.
4:58 Okay, so here we have chart mode standalone. This is just because it's a standard Kubernetes deployment with no cloud provider integration. Go check out the helm charts documentation if you're deploying to GCP or AWS. Then we have the Cluster name, which we're gonna swap out as part of our installation script, so we'll leave this as teleport domain placeholder for now. Then we've got proxy listener mode. Of course, I love multiplex mode. Use multiplex mode. We only want to poke one hole into our Cluster and get all of the teleport goodness. Then we have a replica count to one.
5:32 We can change this in production. We could run three of these if we want, but right now we're just gonna focus on getting this deployed to our local kind cluster. Which means, of course, we don't need Acme either because we're going to use the in ClusterAPI Cert manager for a self sign certificate. We could use ACME with teleport directly, but right now we just want to get this deployed so that I can show you all the cool features. With that being said, we then have 05, which is our helm install. You can see here we add the Helm repository.
6:04 We update the chart. We do an envsubst with our values that we need. These can be provided via .envrc and direnv or some other ability for you to get environment variable into your pipeline. We then run a helm upgrade, install, and bam, we will get our Cluster. So let's throw this. Our kind cluster, and this will take just a moment. And in fact, well we wait, let's split this tab, get pods, run our watch, and we can see here we have our off and our proxy spinning up. Not quite ready yet, but again, and we'll, but they will be there in just a moment.
6:44 Voila. Now we have teleport deployed to our Cluster with both pods. Happy, healthy, and running. So let's run verified deployment, and it speaks to the teleport proxy and verifies that we can access the Cluster. So now we can sign in. But to do that, we're going to run another script, create admin user. We can click our web invitation and just fix our port number. And now we can provide our password. Think. So we click next. We set up our two fa. I'll just save this to one password. And now we have access to our teleport Cluster.
7:52 Perfect. So what was in the create admin user script? Well, this does tctl user to add admin with editor and access and access to the root user, essentially creating a teleport admin account. It just does this by kubectl executing into the teleport namespace and a pod and running teleport control. But this was quick, dirty, good for dev, not quite ready for production. So let's elevate this to the next step. So here we have my real Rawkode Cloud production deployment of Teleport. We are using flux CD and we have a helm resource. The GitOps part is not that important for this.
8:43 This is just automating the helm deploy, using the same helm chart that we used earlier. If we scroll down, we can see my production values for the helm release. That is, it runs on Teleport, do rawkode.cloud using the multiplexer. Did I mention that was one of my favorite features? We do have ACME enabled. So Teleport is actually managing its own X 5 0 9 TLS certificates via Acme, and lets encrypt using Rawkode Academy email address. And we have some persistence here using my Mayastor setup. Again, not important just now, if you're running on GKE, AWS,
9:22 et cetera, just use their uh, CSI provider for the Rawkode Academy. I just need one replica. Of course, you could bump this up if you want to have resiliency and redundancy across your Cluster of a Cluster IP service now in the Rawkode Academy production Cluster. We are using the gateway, API, via Cilium. So we do have our TLS root configured like so, which is the new gateway, API spec. I won't get into that here, but it is rep, not repl, but it'll be what you're using in the future instead of ingress if you aren't already using it now.
10:02 And this also needs a reference grant because we do need to give this the ability to communicate or expose other services within our Cluster. So that is my production deployment for Teleport using the Helm chart via a flux CD deployment. It's not that dissimilar from what we have, just deploying it to a local kind Cluster. There's just a few little things you may need to tweak for your setup. I'll see you in the next video.