 Cool, so let me know what people are seeing. I'm monitoring the chat you are live so we're Yep, so I'm gonna go ahead do our count off and then everyone. Let's go. It feels tested. Let's go. We got okay Alright everyone. We're trying this again Let me know how the quality is. Let me know if I'm cutting out a whole lot. It's quite possible But we'll try this one more time So I don't know what you all caught of the introduction last time But this is fields tested and I'm castling fields And I'm gonna I put this in earlier because we were having so much trouble And I went over the code of conduct and I went over some of the shows that you're gonna see later So I just want to give another brief introduction to what I'm trying to do here which is I'm trying to give Give everyone a chance to see cloud native technologies in some form of context So I'm gonna try to do kind of small projects with cloud native technologies And the one today with this super broken slide is going to involve Both Kubernetes and technically you can argue container run times And it is inspired by I really need to fix these animations I'm gonna skip that It's inspired by Thanks pop Sorry, I'm such a mess today first stream So my goal for for today is to try to host a personal blog on Kubernetes, which we're off to a great start on We'll see how this all goes But it's inspired by this tweet which I posted on Twitter Hopefully a bunch of you have seen it before where someone is trying to create a sandwich using Using power tools Which I would agree kind of feels like what hosting a personal blog on Kubernetes seems like to me But like I said in my promo if you saw that what good is an opinion without empirical evidence? So do I have other stuff in the slide deck? I don't think I do. Yeah, we're just gonna tell a story now Thanks, I appreciate all the support so much everyone's been so nice so Part of the reason that I wanted to do a personal blog on Kubernetes for my first episode was because like I said in the promo if you saw that I Tried to do this like five years ago It's a very different experience. I'll tell you that much And I want to kind of I could explain why I'm gonna approach it the way that I'm gonna approach it today But I think it's better to tell a story So let me tell you about why I tried to run a personal blog on Kubernetes like five years ago So it's end of 2015 early 2016. I Had just been laid off from my first job in the tech industry rough times but It was okay, and there were a variety of circumstances that led to it and it wasn't unexpected and I was in an okay place But I had I was now in the position where I needed to be looking for a job And I had gained some really cool skills around using containers in my last job And now I had some free time And Something I'd always wanted to do was to have a blog Especially one where I could post artwork, which if you've ever seen my website caslin.rox I tried to post fun artwork and and technical stuff there so I wanted to make that a reality and make it happen and I'm a computer person Like I work in the tech industry and everybody's talking about how easy it is to build a personal website all the time I feel like I was like I can do that, right? Further backstory When I was in college, I actually skipped all of the web design courses through a variety of circumstances So I've never done any web development at all. I don't know the first thing about running a website and I'm Between jobs and I'm trying to run a personal website. I know a little bit about containers So I'm like, okay, I'm gonna run a personal website on containers. So I wanted to set that stage for you From that starting point. We're gonna explore Running a personal website on Kubernetes today So the first thing that I need to figure out as someone who knows a little bit about containers and absolutely nothing about web development Is what does it take to run a personal blog? So I've got a I've got a Google doc up here But I thought we'd use to track our progress in trying to achieve this goal today So our first question that we need to answer is what does it take to run a personal blog? Caslin of five and a half years ago had no idea. So let's just Google running a personal blog site And I think the the results today are going to be at least similar enough to what I want To what I saw five years ago. Yeah, so we've got this recommendation here from Google that says The technical setup when starting a personal WordPress blog. So at this point in my life I had heard of WordPress. I think but I didn't know anything about it But I've heard of it before and it's mentioning it here. So WordPress seems like a solid choice There's also all these things like Wix and the square space and stuff that you always see all of the ads for on YouTube at least I do and So you could do something like that Let's look at one of those maybe well What I know about those is that they make it really really easy to run a website and at this point I'm thinking But I want to learn about using containers. I don't want to just take something that's given to me I want to do it the hard way for learning purposes Because I I have good ideas like that So let's just look up WordPress WordPress So couldn't I find this thing WordPress.com that seems like a good place to start Says that 41% of the web is built on WordPress Cool that seems like a very reasonable thing for us to try to build on a website with then I don't know anything about it, but it seems like a good place to start and they have to start your website button Which I wonder what it'll do if I click on it. You'll have to like log in and stuff But what I've learned since at least is that on WordPress.com you can make your own personal website And please folks in the chat. I would love to hear from you about your experiences with personal blogs Are you all running personal blogs? Have you all tried to run it in kubernetes before? Did you do something like this? Please tell me about your experiences because mine are pretty limited and we would all love to hear from you So what I've learned about WordPress.com is that you can Uh spin up a website really easily here. It's like a lot of the other sites Where it gives you really nice tools for spinning up a website really easily You can figure out your domain name and and all of that Just kind of within wordpress.com Like I said, I'm doing this up the hard way So instead I go and buy a domain name, which I didn't know anything about before this Um domain registrars Give you a sense of what I'm looking at I've heard of things like go daddy and and domain name registrars before Um, so I did a bit of research and looked around at a few different domain name registrars and I bought a domain name Planning to make a personal website out of it Um, so that was an important first step And now we know that we want to try and use wordpress for our personal blog So like I said, I've got a little bit of experience with containers I want to see if I can run wordpress in a container. That seems like a good place to start. So wordpress Docker I've been doing a lot of docker work at this point. Um, so I was pretty familiar with docker then Less so now I'd say but uh, if I go here We've got a wordpress image on docker hub. So that seems like I'll probably be able to run a docker container with wordpress in it That's a pretty good start Um, let's see how we can actually do that So there's this how to use this image section, which you will probably can't see at all. Let me Zoom way in and close this and Make this a bit bigger I'll make this even bigger Maybe not that big So we're on docker hub and we've got this wordpress image and we're trying to learn how to use it. Um, Now that I've done that I'm gonna open up a terminal who Hi, hopefully you all can see that well Yeah, anyone running any personal blogs? Please share. Love to hear from you all um so I'm gonna try to run this thing in docker So if I run docker on my machine, I can see that I've got docker installed, which is good Oh, you're running one, but it's not on kubernetes. Can you tell us a little bit about? Uh, what process you went through? I would love to hear because I have an idea how other people approach this problem Um, so we know that we've got docker installed here. Uh, that's a good first step Maybe make this just Yeah, so I can get back to this easily This slightly over two, uh-huh so I'm gonna try to run this docker command because that's what Caslin currently and Caslin of five years ago would try to do upon looking up something that I wanted to run in containers I would just try to run the first thing that I So if I try to run this Uh, it won't find the wordpress image. So that's good. It's pulling the wordpress image This is looking pretty good we're, uh So I found An a container image to run wordpress and now it's downloading that image So in theory, I should be able to run this and actually run wordpress Let's see And it gives me an error Because it says network some network not found So at the time when I was trying this I was pretty familiar with docker and probably had set up a few docker networks Oh, you use jekyll cool. Thank you so much for sharing your experience Allows you to launch a preconfigured blog website created using ruby Yeah, I hear a lot of good things about jekyll Maybe I should try that someday But so we we did docker run and Gave it a name of some wordpress and this network piece is the problem Because I don't have any docker networks set up at the time I knew what docker networks were Current present caslin does not so I don't think I want to run it that way Let's see what else we have in the information um So the following environment variables are also honored for configuring your wordpress instance We've got some stuff about wordpress db host So it looks like we're going to need a database To do this which is interesting a lot of people I've I've gotten the question pretty often of can you even run Databases in kubernetes. So this is going to give us a chance to check that out um It seems like which it is spoilers it is So I know I'm going to need a database of some sort I've got a bunch of environment variables here that I know nothing about because I know nothing about wordpress That I'm going to have to figure out how to run I've also got another Docker run command. Let's actually do a little bit more thinking about this one this time Since the last one failed um If you'd like to be able to access the instance from the host without the container's ip Standard port mappings can be used. So this one is saying I'm going to run a wordpress container And I'm going to run it on a specific port on the machine that I'm running it on. So that sounds pretty good That sounds like something that we can do. Uh, so let's try that I'm going to come back over here and I'm going to do docker run some wordpress is fine and Do that Oh no, I must have tried this earlier procker ps Um, docker ps dot cache a Oh because I just ran that other command and it failed um, it actually created a container, but it Didn't work out So if I run docker ps, I don't see any running containers But if I run docker ps dash a which shows me all Running and stopped and not in a good state containers I can see that I've actually got the wordpress container that I tried to spin up Still and it's using the same name. So it's not letting me create the container So I'm going to run docker rm And uh fun tip If you're working with docker you can just use any unique string from the container id to refer to the container So if I run this I should be able to get rid of that container Cool. So now my wordpress container that I created in error is gone And now I should be able to run this new wordpress container that's using port 8080 and at some point today, I'm going to mess this up It's very important when running docker commands to use dash g least in my experience Um, because dash g runs the container in detached mode. And if you don't do that the running container will take over your uh It will take over your command prompt. So I've Caused myself some problems before by doing that Docker ps dash a We can see that it's running if I run docker ps. I should also just see it. Yep So this container looks like it's running happily So it's running on my local host on port 8080 8080 is the local host port and 80 is the port in the container that is being mapped to I believe I always get that mixed up But we do local hosts 8080 Oh, look, we've got wordpress running boom. There you go. We're running wordpress in a container halfway there, right So Oh, but it says that we need a database. So we really do need that database thing that we saw in the docker hub stuff So Let's see here So our first question to answer was what does it take to run a personal blog? I want to come back to this for a second and say we needed a domain name. We talked about that and We needed to decide what to use to run the blog which we're going to use wordpress Um And so now Can I run wordpress in a container was my next question? And we have determined yes But I need a database So now I need to figure out how to run a database container that this wordpress instance needs and a nice thing in this docker hub entry Is that it has this yaml file that defines What you could use for docker compose to tell docker spin up multiple containers for me So that sounds pretty good Let's just try this But let's see what we have in it first. So there's two services. The first one is called wordpress. That's what we want to run That makes sense It's got port 8080 So I'm going to want to delete that container that I already have running if I'm going to run this because otherwise it's going to have a port conflict It's a good thing to just back at it first Your blog is called daemon sets nice It's a good blog name Um And then there's all these environment variables that must be wordpress stuff Looks like it's telling wordpress how to connect to the database information about the database db host db user db password and db name That's got a volume So When I tried this like five years ago Uh The instruction page here was a little bit different. I don't think it had the instructions to create this volume um But since at the point where I realized that I needed to create a database container um I knew about docker volumes So docker volumes are docker's tool kind of for Using persistent storage with containers. So if you have a container that's going to run some application that needs a volume uh Needs to have persistent storage that could persist if Say the container were to go down you would still want to keep that data Um, then you're going to want to have a volume. So that makes total sense for a database. We probably want our data to persist Uh, so we're going to create a volume and in dockerland Uh, you can specify the name of a volume and then where it's going to be loaded into the container So in slash of r slash lib slash my sequel which I assume is An area where it's important for my sequel databases to have persistent storage Um, we'll set up a volume that will persist even if our container ever dies So that's good. And then we're setting up one for wordpress as well um Kind of tempted to show you all what happens if you don't do that on the wordpress side because it's pretty interesting But we're already pretty kind of behind schedule and I want to get to running this on kubernetes without Taking up too much time. So I think I'll just try running this compose So I'm going to docker rm-f 83 So that get rid of that wordpress container I was running earlier So docker ps Now I don't have that running if I check ps-a you can also stop a docker container and then you'd see it in ps-a Because it hasn't been removed. It's just stopped But it still exists So I removed that one. It's not here anymore. Let's try creating a file I'm going to call it Wordpress Docker got yaml that sounds reasonable And I'm going to input all of the stuff that I saw on the The docker hub page so Again, this gives me all of the information I need to create another wordpress container with environment variables that are apparently important for wordpress and To create a database container with also some important Things set up in it and then volumes for each of those so that Storage will persist across restarts and things like that So Then if I run docker it actually has this on the docker hub page as well Yeah, so we're going to want to run docker compose dash f Give it the name of the file and then up And this actually has been changed so that you can do it With a space instead of has its own command so docker compose dash f wordpress docker.yaml and then we're going to up that Okay, so now we see that docker is building our containers that we defined in the yaml Have you all done this kind of stuff before? How long has it been since you all worked with docker? I'm curious It's been a while since I worked with docker. I did a little bit of exploration before this uh to make sure that I would Not spend the whole time just looking at docker commands Because it's been so long since I used it Oh, no, you know what I didn't do. I didn't use dash d So look what's happened. It's taken over my terminal I hate it when I do that. This is bringing back great memories. I'm glad Uh What is going to happen if I control see this because I kind of want my terminal back Um, maybe we should go to 8080 first and see if it's up and see if this worked and then I'll worry about getting my terminal back So this is from before let's try localhost 8080 again. Let's reload this Okay, so we've got wordpress page again. That's good Oh, and this is different. You see so last time it said that I needed to connect to a database But this time it seems to be saying that I I I imagine that I have the database already So my compose should have worked I've got a wordpress container running and I've got a mysql database container running and they can talk to each other awesome So now you can give your site a title and set up a username and set up an email and all of that Now I was hoping to go ahead into wordpress and set something up and then kill some containers for you to show you what happens Um, but what do you all think we're getting kind of short on time? I think I might move on to running it in kubernetes That sounds good I remember the first time I ran docker compose up. It was magic. I agree with that lucky How long has it been since you worked with docker? I think pop is asking everyone in the chat for me But for me, it's been like five years Yeah, run it in kubernetes. Okay, so that's what we'll do next instead of Messing around with killing containers and seeing what happens with the persistent volumes and things we can always explore that another time So i'm just going to control see this. We don't need these containers running anymore Anyway, it says that they're stopped. So if I run docker ps, I won't see anything if I run docker ps-a Then I see that they're still here, but they're exited Which is fine. I'm just going to leave them like that Now what I want to do next is figure out how to run this in kubernetes Luckily a few years ago. I noticed that in the kubernetes documentation There is actually a really nice guide for how to run wordpress in kubernetes Cool So here we've got an example in the kubernetes documentation For deploying wordpress and mysql with persistent volumes This is exactly what we need We just saw the How to do this with docker. So now we're going to try to do it with kubernetes And lucky says I use kind a lot. It's running in docker under the hood. So you could say I use it regularly That is a fair point I've heard great things about kind. I hear it's it's really good I'm currently using docker desktop by the way for all the docker stuff. I was just doing Really nice tutorials for that too if you want to practice your docker commands like I did So this should be pretty much the same thing that we saw in docker, but now it's in kubernetes So create persistent volume claims and persistent volumes This is going to be the kubernetes equivalent of docker volumes that we just talked about a little bit ago So Interesting it wants us to create a secret By the way, I didn't practice this part of actually running it on kubernetes So if you have to go no worries, but I'm going to try to do this relatively quickly and kind of point out some of the important things about kubernetes as we go So they're wanting to spin up a secret which is a kubernetes object that stores a piece of sensitive data Which you all can't see at all probably Like a password or a key Since 1.14 kubectl supports the management of kubernetes objects using a customization file So you can create a secret By generators in customization.yaml add a secret generator in customization.yaml from the following command You will need to replace your password with the password you want to use Okay, so this is We're going to try to use a kubernetes secret which is first secret data To set up a password for our mysql instance that we're going to run in kubernetes That's a good thing to know And let's look at some of the other stuff we're going to try and do here too before we move on Add resource configs for mysql and wordpress the following manifest describes a single instance mysql deployment Okay, the mysql container mounts the persistent volume at slash fire slash lib slash mysql So the same place we were mounting it in docker and we saw that that Well, we didn't try deleting the the container and stuff but I tried it earlier and I will tell you that's the right location It would persist across restarts if we tried that The mysql root password environment variable sets the database password from the secret Okay, so we need our secret in order to set our database password which will be set up in This So this file is a bit longer Than the one that we saw in docker someone said I get hung up with the network stuff in all this tech me too Like I said earlier the command uh that made use Of docker network or forward press haven't used that in so long Speaking of which Not even using my nice mic, so I'm so sorry about my audio quality Which hopefully just improved significantly Um Kind plus b equals heart. Yeah kind is great. There are great things about that So this is a lot longer than what we saw in Docker, but let's see what we're trying to make here. So kind service some other one The docker compose example, which apparently I don't have up anymore We had two services wordpress and mysql um That was used a little bit differently than it's being used here here. It's a kubernetes yaml manifest So we're talking about the kubernetes object of a service So Thankfully, I know this now because I've been working with kubernetes for a while, but I'll tell you me if five years ago did not Um, so we're going to name our service wordpress dash mysql and we're going to give it a label app wordpress and then so we're specifying a port that our service is going to run on and A selector app wordpress and tier mysql So these selectors are how our service is going to understand What actual containers it is serving so service in kubernetes is one of the first things that you'll spin up if you ever do Like a beginner's kubernetes guide. I think most of the people watching have done that before I just noticed that I still have a Menu up. Okay, so It's one of the first things that you'll do in any beginner tutorial in kubernetes is you'll spin up A deployment or some kind of pod or you'll run containers in kubernetes. Basically. It's what we're going to talk about when we get to deployment um, and then you use the service to actually access that deployment I still love and use docker almost every day Use the same approach that you've demoed docker compose for quick poc and then followed by kubernetes Yeah, awesome. I love to see that that's a pattern that other people use I find it really helpful to understand what i'm actually doing With the containers and how i'm actually running the application before I start bringing kubernetes objects So the nice thing about a kubernetes service is that it can be the It can kind of act as a load balancer across a bunch of different replicas of a container If you want to run something high availability So that's really nice I don't know that I need a whole bunch of copies of my wordpress for just running a personal wordpress blog But it's good to know that kubernetes can do that And then we say cluster ip none It doesn't actually specify the type of Service explicitly it's been a while since I've made a service manifest. So I find that interesting I guess this is technically a node One I don't know. I need to look things up So anyway, we're going to move on to persistent volume claims and then The following manifest describes a single instance. I'm looking to see if there's a Okay So this is just a slightly different one um So this is a persistent volume claim And it's being called mysql pv claim wordpress It's getting the label app wordpress And then it's going to be a read write once volume and 20 gibby bytes Cool, so this is a local persistent volume claim I assume Do we need to Does it say something about setting up an actual persistent volume first? So mysql wordpress each require a persistent volume to store their data We saw that in docker their persistent volume claims will be created at the deployment step Oh, okay. So maybe it's in our actual deployment Yeah, there you go volume mounts and volumes. So that's where we're actually defining our persistent volumes So in kubernetes, it's not just volume like it wasn't docker You've got a persistent volume and then you've got to claim that persistent volume with a persistent volume claim Which honestly, I haven't worked with in a while But I'm going to read a question Here's my silly question. Let's say you didn't have a great guide like this How do you know what keys you will need on the left hand side? Do those match up with something the keys? I mean are like oh spec metadata spec, etc I'm not sure how I would have gone about knowing how to use Or knowing that I need them. I have had that same question. I will tell you If you ever do the the ckad certified kubernetes application developer exam You will have to practice that a lot You'll kind of get a sense for all of the important things that you'll need in every single yaml manifest for kubernetes API version is always going to be there kind is always going to be there because it's telling you What kind of kubernetes object you're going to create? This first metadata one is pretty much there for every Object because you're going to need to name the object that you're creating and have the opportunity to give it labels Even kubernetes node objects, for example, have labels. So that's a pretty common thing And I think there's pretty much always the spec section But what goes in it beyond that varies depending on what kind of kubernetes object you're building So you have to get a sense for What kubernetes objects are and what kinds of Yammel components Are are applicable to those kubernetes objects, which I would check out the documentation for would be my recommendation Yeah Daman, I'm sorry if I'm pronouncing your name wrong very sorry Is saying well for the most part there is a specific pattern to the spec you specify the api version object kind metadata data and the spec But you can always use kubectl dry run to generate Yeah, kubectl dry run is a really nice tip that you'll see if you ever practice for the certified kubernetes administrator or certified kubernetes application developer check out certs magic with scion later It's a big tip for those is to learn how to use kubectl dry run to generate kind of a base Yammel file for doing this stuff Cool And then yeah, okay making sure that there aren't any other questions Good good. So we've got a persistent volume claim here. We've got a service definition here and we have Deployment definition here, which is pretty big Deployments can do a lot of stuff Um, so deployment is how we're going to run our actual containers that we care about Uh Interesting. So we have both the wordpress and the mysql defined in the same deployment definition Uh wordpress dash mysql is the name of this deployment This makes sense So we're giving it a label app wordpress and selector match labels app wordpress tier mysql Not sure what that's selecting for people know Please let me know. I'd love to explore that more um strategy type recreate. So this is um Something specific to deployments uh It i'm guessing it describes what will happen if something happens to the containers something like that I would have to actually look it up Spin up a kind of mini cube and go through the cave stocks. They are super useful to get started and understand Aspects of the yaml very useful cheat sheet very nice um And then got some more labels here app wordpress tier mysql So these selector labels are being used to Uh specify which pods in kubernetes The deployment kind of owns We don't have a pod spec in here. We're not specifically saying we're making pods Instead we have this container section within the deployment and the deployment just kind of knows Oh, you want to run containers? I'm going to put those into a kubernetes pod object for you Look at this. We're learning so many kubernetes objects today And then we're specifying the container image that we want to use which is mysql 5.6 Uh and giving it a name environment variable We saw this one before mysql root password and then we're going to make that from a secret like we talked about earlier And uh container port name mysql Volume mounts mysql persistent storage mount path bar live mysql Uh and all of that I don't see a container definition with the intimate an image for the the wordpress App did I miss it somewhere? Uh single instance mysql deployment that'd be why Because it's got this separate one just for the my just for the wordpress Um, so this is quite a bit more text than we saw in the docker one and we have Honestly quite a bit more stuff for running things at high availability Deployments have a lot of tools for running things at high availability Um, I assume that's part of what this strategy one is about. I've got to go look that up again uh and then A common thing that people talk about with deployments is doing rolling upgrades Deployments have really cool smarts built into kubernetes for that Uh, so deployments are meant for being able to run things In a highly available fashion As are the persistent volume claim as is the service. So we've got a lot of uh Nice high availability tools in here and then uh In the other one, we've got a service of persistent volume claim and a deployment So we've gone over kind of what all of that looks like great. So I want to try to just run this If that's okay and Pop let me know if you need to go because pop is helping me run this stream since I was having so many technical difficulties Everyone big thanks to pop I don't think that the yaml example has the persistent volume included Uh, it's expected Uh, it's expecting to be created before it's executed I thought that at first two something like this would work if you add it to the top of the example Yeah, so you can specify a persistent volume separately I've seen that done pretty commonly in specifying a storage class As well as uh, the capacity of the storage So for and you don't think that this will work if we run it as is uh Yeah, because it's Volume persistent volume claim. You're right that it doesn't seem to be Specifying volume mount name Specifying a mount path It's been a while since I've spun up a persistent volume as you can tell Uh, but I'm gonna go ahead and download these at least Nice. We just need to add that bit. Does anyone know how to Format the the text in this chat. I think that's okay. I can format it myself The the chat might not let you but I can do it um Cool Apply and verify Get secrets Verify that a persist. Oh see though verify that a persistent volume got dynamically provisioned So this example is expecting that a persistent volume will be dynamically provisioned for us I think I should try it and see if it happens So let's try this. Uh, I'm gonna go ahead and curl this It's kind of nice that in the kubernetes documentation the examples. I have these curl commands Let me Let me control see that for a second not run this just yet There we go and control l there you go much cleaner much prettier easier to see what we're doing So I'm gonna curl down the mysql deployment.yaml that we looked through And then I'm going to curl down the wordpress that we looked through. Thank you everyone for being engaged by the way As we're going through this and I'm asking questions. I really appreciate it Okay, so now we've downloaded I created an episode one folder and then I just put everything in the top level folder. I'll move all of this stuff later so Uh, we've got our wordpress deployment.yaml not the wordpress docker. That's a separate thing and then mysql deployment.yaml So we have those files And add them to customization files. So here we're using cat to create another file, which will be called customization.yaml And it just says resources And it specifies those two yaml files But these instructions don't even include that secret that we saw at the beginning So I'm going to go ahead and run this one first. I feel like that should be in the bottom Instructions And then I'm going to run the other cat command that we have down here, which Sets up a customization.yaml that specifies the resources So the customization.yaml file contains all sources for deploying a wordpress site and a mysql database You can update the directory by running kubectl apply dash k and dash Let's see if that works 8080 was refused This might be because I'm running on my work computer I would believe that Oh, actually do I even have Yeah, so I don't have a kubectl setup. I think Isn't my or a like a local mini cube cluster setup or anything? That's kind of important So let's do this. I'm going to open what we just talked about in visual studio code This is an easy tool for me to use to get a mini cube setup So there's a cloud code plugin, which is a thing that google makes So that's how I know about it because I work at google, but it's just a thing you can use Um, and it can help you manage your kube config. I've got like this old Cluster in here that doesn't even exist anymore. So I don't care about that But I do want to start a mini cube cluster. So I went to cloud code in visual studio code um, and then I hit the plus button in the kubernetes, uh thing And then I'm going to say start a mini cube cluster Mini cube cluster is currently stopped. Let's start it Oh Look down here. We can see that it's spending up a mini cube cluster You probably can't see it very well because it's super tiny Um, but we are starting up a mini cube cluster, which we'll run this on. That should be good That might take a second and I'm actually trying to write a spring up cluster on this machine So We will find out and while it's doing that Like in the fast lane. Yep This we'll need any more That we had earlier here. So this is kind of nice to be able to actually look at our files I don't know how long this will take. So We'll just wait around here for a couple more minutes. If it's not done. Maybe we'll Do something else. I consider trying this bit of a cluster in the cloud before I got started today But thought oh mini cube will be fine. It'll be quick But once that's up, we'll run the cube CTL apply Command basically Which might be a little bit. Oh, would you look at that? Starting to look a lot like mini cube Oh, is that docker? Oh, okay. That's docker Because I opened that up Interesting I haven't actually looked at the docker plugin in visual studio code, but you can see like all of the containers that I'm running Hey, it's mini cube. I just saw a new one come up in docker. Does that mean? Oh creating docker container That's pretty cool. So we can see in the docker extension of A visual studio code The cloud code extension creating my mini cube cluster That's pretty cool But it's still not up yet. I got excited there for a second But oh well, uh, so once we do that apply Verify that the secret exists. So it's a good thing that we ran that cat command from earlier Uh, we want to make sure that that secret exists Looks like it's using customization.yaml. So I wonder what my customization.yaml file looks like right now actually It's getting toward 230. So If this keeps going with the mini cube, we'll probably stop here for the day and then Try to finish up running our our Kubernetes cluster Next time when hopefully I'll have all of my technical woes figured out as well But our customization.yaml does have both the secret generator and the resources stuff that we added earlier So that's good Hopefully when we run our customization, it'll run the secret generator and create our secret as well as Running our deployment.yaml. So that will run everything It's kind of like docker compose. Good finished. Yay. So we'll see if I can do this quickly Um, cool. So now I've got a mini cube cluster up and running and I wonder if I can zoom in on this at all Oh, I can. Yay. Wonderful I'm going to close this So I'm not running a GKE cluster right now. I'm just running a local one Which hopefully isn't sending my computer into a tailspin so You can see all of the deployments that we have running all zero of them For pods all of our services. These are all of the Kubernetes objects that we might be running which we are running none of currently In our default namespace Which sounds like a fine place to run stuff to me Cool So let's see how we run this So I don't really remember um Cloud code run on kubernetes Looks like I've got some problems with my visual studio code setup. So I might not be able to run this here But Let me see here If I Might go back to what I'm more familiar with. Let me remove Context under cluster Do you want to delete this old cluster that I don't actually even have anymore from your kube config? Yes, I sure do So now my kube config should just have my mini kube in it. So if I do go back to my terminal Let me control l so that it's clean kubecpl Just run that see if it oh Well, I've got the command. I don't need that didn't I? Uh get nodes Look yay, I'm in my mini cube cluster. So now I should be able to run this from the command line, which I'm more familiar with So let's do that Okay, not pay as well as I always like to check where I am Okay, so now I should be able to run that kubecpl apply command that we were looking at earlier Which is right here So let's try that Quickly and then we'll try to finish this up. Okay. It created a secret it created So the thing on the left of the slash here is going to be the kubernetes object Uh, and then on the right is the name of that object So we've got a kubernetes secret. We've got kubernetes services we've got deployments and persistent volume claims But I don't see a persistent volume created So maybe you're right. Maybe we do need to add that to this This uh tutorial. Maybe that's something that we need to submit as a book. I don't know. Let's find out Um Verify that the persistent volume got dynamically provisioned. It says to run kubectl get pvc Which does specify the volume if we run that so let's see what we get if we run Well, it specifies a volume With a capacity But is this just the volume claim itself? Can we run kubectl get pv? If we run kubectl get pv It's kind of hard to see But there's a name There's a capacity access mode Reclaim policy Its status is bound So it looks like it did actually auto generate persistent volumes. So Mini cube via code is three star I agree mini cube via cloud code is really nice So it it does look like it actually created a persistent volume dynamically, which is great to know Yeah, this is that's what I just ran Is kubectl get pv right here. Hopefully you can see that. Yeah, isn't that cool? So in theory this should work and I think the wordpress in my sequel should already be up and running So if I run kubectl get services wordpress Let me clear again. I don't like it when my screen is full of all that big text Um, oh, but it has it as tight load balancer. Okay I was wondering because I didn't see the type specified in the oh, but that was because it was the my sequel I didn't actually look at it in the wordpress one in the wordpress service It does say type load balancer So that's not going to work out. So well in mini cube is it Load balancer is really nice when you're working in a cloud provider. Uh, because generally the cloud providers have uh, really convenient Default on uh plugins. Uh, if you run like in their managed services, I guess is the better way to describe that. Um Where it'll spin up a load balancer in the cloud for you So running load balancer in the cloud is so easy but Okay, so The response should be like this wordpress load balancer should be pending I don't expect it to ever have an external ip because we don't have an actual load balancer in front of this load balancer Uh, but it does have a cluster ip and it is up on a node port. It looks like Fun fact load balancer type services actually require like they use node ports to do what they do So that makes total sense that it would have a port even though it's not type node port I'm saying a lot of words that people might not understand here, but Uh, there are several different types of services a cluster ip service means this app can talk to other things within the cluster A load balancer type service means that uh, there's a load balancer of some type That you'll use to get access to whatever containers you're actually running on kubernetes. So that's what we've got here Um, and then there's a a node port type service in kubernetes, which will Spin up an actual port on the node that the container is running on that you can access the container from And load balancer uses that so we should be able to access this on a port Minicube can only expose services through node port The external ip is always pending That's exactly what I was expecting Uh, run the following command to get the ip address for the word press service Let's see. I don't know if the minicube command is installed So that doesn't seem like it'll work very well Um, so I don't know what my local Uh, ip address for my minicube is I wonder how we can find that without me having the minicube command line tool Huh? Downsides of using cloud code to generate a minicube cluster, I guess um But then once we do that, I expect that we'll be able to see this if I curl Can't curl it because I don't know what the ip address is Um Service wordpress url How do I find out what the ip address of my minicube services any suggestions for what I should look up here Our most welcome. It's also almost 230. So I'm going to try to get off of here soon Um, I at least want to try I know that it's running in kubernetes It's We are running a personal blog in kubernetes, but we're not running it online We're not running it in the cloud. We're just running it locally and I don't know how to access it right now Yeah, the pods are up. So we know that it's there Um, but I'll have to figure out how to actually access my minicube since I don't actually have the tool installed a little bit later So I don't want to keep people for too long. Yeah Next week we'll do part two and and finish this up So thank you all for joining me today I had a lot of technical difficulties and I appreciate it so much for those of you who've been with me I hope that you learned something interesting Uh, and I hope that next time will be a lot smoother But thank you so much