How to Make Your First Kubernetes Deployment in Minutes!
Read full transcript 13 segments
-
So you have your Kubernetes cluster up So you have your Kubernetes cluster up and running. Now what? If you want to and running. Now what? If you want to and running. Now what? If you want to use Kubernetes, you need to deploy use Kubernetes, you need to deploy use Kubernetes, you need to deploy applications. And pods are one of the applications. And pods are one of the applications. And pods are one of the ways that we can do that. Pods are the ways that we can do that. Pods are the ways that we can do that. Pods are the fundamental building blocks of fundamental building blocks of fundamental building blocks of Kubernetes. And they're surprisingly Kubernetes. And they're surprisingly Kubernetes. And they're surprisingly simple to create once someone shows you simple to create once someone shows you simple to create once someone shows you how to do it. In this video, I'll how to do it. In this video, I'll how to do it. In this video, I'll demonstrate exactly what pods are and demonstrate exactly what pods are and demonstrate exactly what pods are and the three easiest ways to deploy them. the three easiest ways to deploy them. the three easiest ways to deploy them. Let's start with the quickest way to get Let's start with the quickest way to get Let's start with the quickest way to get a pod running. So the simplest way to a pod running. So the simplest way to a pod running. So the simplest way to create pods is using the cubectl run create pods is using the cubectl run create pods is using the cubectl run command. This is perfect for quick command. This is perfect for quick command. This is perfect for quick testing or when you're just getting testing or when you're just getting testing or when you're just getting started. So what we're going to do is started. So what we're going to do is started. So what we're going to do is we're going to run a we're going to run a we're going to run a quick engineext pod called enginex demo. quick engineext pod called enginex demo. quick engineext pod called enginex demo. So when I run this command command So when I run this command command So when I run this command command cubectl run engineext demo image cubectl run engineext demo image cubectl run engineext demo image engineext, we now see that a pod called engineext, we now see that a pod called engineext, we now see that a pod called engineext demo has been created. Now, if engineext demo has been created. Now, if engineext demo has been created. Now, if you want to check out which pods are you want to check out which pods are you want to check out which pods are running here currently, I can run the running here currently, I can run the running here currently, I can run the command cube ctl get pods or k get pods command cube ctl get pods or k get pods command cube ctl get pods or k get pods for short. And I even have an alias for short. And I even have an alias for short. And I even have an alias called kgp if you want to have it even called kgp if you want to have it even called kgp if you want to have it even shorter. So, if I check out these pods, shorter. So, if I check out these pods, shorter. So, if I check out these pods, engineext demo, we see already that the engineext demo, we see already that the engineext demo, we see already that the pod is already running. So this is the pod is already running. So this is the pod is already running. So this is the fastest way to get a pod up and running fastest way to get a pod up and running fastest way to get a pod up and running if you're just starting starting out if if you're just starting starting out if if you're just starting starting out if you're testing out things and you just you're testing out things and you just you're testing out things and you just want to get something up and running. So want to get something up and running. So want to get something up and running. So the the cubectl run command is actually
-
the the cubectl run command is actually the the cubectl run command is actually quite expansive. You can do quite a lot quite expansive. You can do quite a lot quite expansive. You can do quite a lot of things with it. So if you do k run of things with it. So if you do k run of things with it. So if you do k run and then help then you see that you can and then help then you see that you can and then help then you see that you can do um it gives you a few very do um it gives you a few very do um it gives you a few very interesting examples here. So you can interesting examples here. So you can interesting examples here. So you can run a hazelcast pot and let the run a hazelcast pot and let the run a hazelcast pot and let the container expose port 5701 for example. container expose port 5701 for example. container expose port 5701 for example. So you can expose ports, you can So you can expose ports, you can So you can expose ports, you can override things, you can add labels, you override things, you can add labels, you override things, you can add labels, you can um change the images. There are all can um change the images. There are all can um change the images. There are all sorts of things that you can do. Set sorts of things that you can do. Set sorts of things that you can do. Set environment variables just from this environment variables just from this environment variables just from this cubectl run command. So for example with cubectl run command. So for example with cubectl run command. So for example with d-n you can set environment variables. d-n you can set environment variables. d-n you can set environment variables. You can expose a port on the container You can expose a port on the container You can expose a port on the container and you can add labels to the pod just and you can add labels to the pod just and you can add labels to the pod just from this command. So if I wanted to from this command. So if I wanted to from this command. So if I wanted to expose a port 80 and set an environment expose a port 80 and set an environment expose a port 80 and set an environment variable, I can use this command. So variable, I can use this command. So variable, I can use this command. So cubectl run and then engineext env. So cubectl run and then engineext env. So cubectl run and then engineext env. So that's a new pod that's going to be that's a new pod that's going to be that's a new pod that's going to be created with the image engineext and created with the image engineext and created with the image engineext and then I add the flag port 80 and then the then I add the flag port 80 and then the then I add the flag port 80 and then the enginex host is example.com. So if I enginex host is example.com. So if I enginex host is example.com. So if I copy copy copy that that that and I run and I run and I run this. So now if I do k get pods again I this. So now if I do k get pods again I this. So now if I do k get pods again I see I have a second pod running called see I have a second pod running called see I have a second pod running called engineext end. Now if I the the command engineext end. Now if I the the command engineext end. Now if I the the command to to find more information of pods is to to find more information of pods is to to find more information of pods is cubectl describe. So if I do k describe
-
cubectl describe. So if I do k describe cubectl describe. So if I do k describe pod and then engineext pod and then engineext pod and then engineext env here we see some more information. env here we see some more information. env here we see some more information. So you can see um the the name which So you can see um the the name which So you can see um the the name which name space it is in when it was started name space it is in when it was started name space it is in when it was started which labels it has etc. But here we which labels it has etc. But here we which labels it has etc. But here we also see that it has this port property also see that it has this port property also see that it has this port property and here we see it's exposing port 80. and here we see it's exposing port 80. and here we see it's exposing port 80. So this is very useful. You can just do So this is very useful. You can just do So this is very useful. You can just do this from the run command and you can this from the run command and you can this from the run command and you can expose the ports like that. expose the ports like that. expose the ports like that. So, I'm not going to go into all of the So, I'm not going to go into all of the So, I'm not going to go into all of the information uh just yet, but for now information uh just yet, but for now information uh just yet, but for now it's it's enough to know that we have it's it's enough to know that we have it's it's enough to know that we have set um a port and also our environment set um a port and also our environment set um a port and also our environment variable over here. We see that the variable over here. We see that the variable over here. We see that the environment is environment is environment is enginexhostample.com just like we enginexhostample.com just like we enginexhostample.com just like we specified. So, there's a lot that you specified. So, there's a lot that you specified. So, there's a lot that you can do from this um CLI command cubectl can do from this um CLI command cubectl can do from this um CLI command cubectl run. That is the fastest way how to run run. That is the fastest way how to run run. That is the fastest way how to run a pod. Now that we've seen how to quickly Now that we've seen how to quickly create a pod, let's understand what pods create a pod, let's understand what pods create a pod, let's understand what pods actually are. A pod is the smallest actually are. A pod is the smallest actually are. A pod is the smallest deployable unit in Kubernetes. It's the deployable unit in Kubernetes. It's the deployable unit in Kubernetes. It's the basic building block for running your basic building block for running your basic building block for running your applications. But here's the important applications. But here's the important applications. But here's the important part. A pod is not a container. Instead, part. A pod is not a container. Instead, part. A pod is not a container. Instead, it's a collection of containers and it's a collection of containers and it's a collection of containers and their associated resources that are their associated resources that are their associated resources that are deployed together as a single packaged deployed together as a single packaged deployed together as a single packaged unit.
-
unit. unit. The word pod in Kubernetes comes from a The word pod in Kubernetes comes from a The word pod in Kubernetes comes from a pod of whales, which is just a group of pod of whales, which is just a group of pod of whales, which is just a group of whales. Just like multiple whales swim whales. Just like multiple whales swim whales. Just like multiple whales swim together in the ocean, multiple together in the ocean, multiple together in the ocean, multiple containers can run together in a pod. containers can run together in a pod. containers can run together in a pod. This nautical theme is consistent This nautical theme is consistent This nautical theme is consistent throughout throughout throughout Kubernetes. In fact, the word Kubernetes Kubernetes. In fact, the word Kubernetes Kubernetes. In fact, the word Kubernetes itself means helmsman in Greek. It's the itself means helmsman in Greek. It's the itself means helmsman in Greek. It's the person who steers a ship. person who steers a ship. person who steers a ship. So a pod is not a container but a pod is So a pod is not a container but a pod is So a pod is not a container but a pod is a collection of containers. A pod can a collection of containers. A pod can a collection of containers. A pod can have one or more containers and these have one or more containers and these have one or more containers and these containers will share the same network containers will share the same network containers will share the same network name space meaning that they can name space meaning that they can name space meaning that they can communicate via local communicate via local communicate via local host. They share the same storage host. They share the same storage host. They share the same storage volumes and they have the same life volumes and they have the same life volumes and they have the same life cycle. They are created and destroyed cycle. They are created and destroyed cycle. They are created and destroyed together. Think of a pod as a logical together. Think of a pod as a logical together. Think of a pod as a logical host or group for your host or group for your host or group for your containers. In traditional deployments, containers. In traditional deployments, containers. In traditional deployments, you might run multiple related processes you might run multiple related processes you might run multiple related processes on a single VM or physical server. In on a single VM or physical server. In on a single VM or physical server. In Kubernetes, those related processes Kubernetes, those related processes Kubernetes, those related processes would run as containers within a would run as containers within a would run as containers within a pod. Pods are also ephemeral by nature.
-
pod. Pods are also ephemeral by nature. pod. Pods are also ephemeral by nature. This means that they're temporary and This means that they're temporary and This means that they're temporary and they can be terminated at any time. So they can be terminated at any time. So they can be terminated at any time. So when a pod dies, Kubernetes doesn't when a pod dies, Kubernetes doesn't when a pod dies, Kubernetes doesn't automatically bring back that exact pod. automatically bring back that exact pod. automatically bring back that exact pod. Instead, it will recreate a new version Instead, it will recreate a new version Instead, it will recreate a new version of the pod, which might even be placed of the pod, which might even be placed of the pod, which might even be placed on a different node or a different server. A pod definition typically server. A pod definition typically includes several key components. includes several key components. includes several key components. containers. The actual application containers. The actual application containers. The actual application containers that will run inside the pod. containers that will run inside the pod. containers that will run inside the pod. As mentioned, most pods have just one As mentioned, most pods have just one As mentioned, most pods have just one container, but multicontainer pods are container, but multicontainer pods are container, but multicontainer pods are used for tightly coupled used for tightly coupled used for tightly coupled applications. Next, we have init applications. Next, we have init applications. Next, we have init containers. These are specialized containers. These are specialized containers. These are specialized containers that run and complete before containers that run and complete before containers that run and complete before your application containers start. your application containers start. your application containers start. For example, you might use an init For example, you might use an init For example, you might use an init container to check if a database is container to check if a database is container to check if a database is ready before starting your application. Third is networking. Every application. Third is networking. Every pod gets its own unique IP address. All pod gets its own unique IP address. All pod gets its own unique IP address. All containers within a pod share this IP containers within a pod share this IP containers within a pod share this IP address and can communicate with each address and can communicate with each address and can communicate with each other using local other using local other using local host. Fourth is storage.
-
host. Fourth is storage. host. Fourth is storage. Pods can have volumes attached to them Pods can have volumes attached to them Pods can have volumes attached to them and these volumes can be shared among and these volumes can be shared among and these volumes can be shared among all containers in the pod allowing them all containers in the pod allowing them all containers in the pod allowing them to share to share to share data. So now that we understand what data. So now that we understand what data. So now that we understand what pods are conceptually, let's look at a pods are conceptually, let's look at a pods are conceptually, let's look at a more powerful way to create them. So let's dive into creating pods them. So let's dive into creating pods using YAML. So while cubectl run is using YAML. So while cubectl run is using YAML. So while cubectl run is convenient for like simple things and convenient for like simple things and convenient for like simple things and when you're testing out things you want when you're testing out things you want when you're testing out things you want to get something up and running quickly to get something up and running quickly to get something up and running quickly in the real world you typically will use in the real world you typically will use in the real world you typically will use code to talk to the API server and to code to talk to the API server and to code to talk to the API server and to provision resources on the Kubernetes provision resources on the Kubernetes provision resources on the Kubernetes cluster and you do that through what is cluster and you do that through what is cluster and you do that through what is called YAML manifests. So let's take a called YAML manifests. So let's take a called YAML manifests. So let's take a look at this simple YAML manifest for a look at this simple YAML manifest for a look at this simple YAML manifest for a pod. We see that it has a kind of pod. pod. We see that it has a kind of pod. pod. We see that it has a kind of pod. It has a label with of app web. It is It has a label with of app web. It is It has a label with of app web. It is the name of the pod is web app. And then the name of the pod is web app. And then the name of the pod is web app. And then here we give it a list of containers here we give it a list of containers here we give it a list of containers that we want to provision. So in this that we want to provision. So in this that we want to provision. So in this case we are only doing one container case we are only doing one container case we are only doing one container with the name engineext and the image with the name engineext and the image with the name engineext and the image enginex latest and we are also exposing enginex latest and we are also exposing enginex latest and we are also exposing the port 80 again. So this what you see the port 80 again. So this what you see the port 80 again. So this what you see here this ports container port 80 is here this ports container port 80 is here this ports container port 80 is equivalent to running the cubectl run equivalent to running the cubectl run equivalent to running the cubectl run with the port 80 flag.
-
with the port 80 flag. with the port 80 flag. So the way we can use this is I will So the way we can use this is I will So the way we can use this is I will copy this copy this copy this over and let me just delete all of the over and let me just delete all of the over and let me just delete all of the pods that we had. So you can do k delete pods that we had. So you can do k delete pods that we had. So you can do k delete pods all. So now it is deleting all of pods all. So now it is deleting all of pods all. So now it is deleting all of the pods. And if I now do k get pods the pods. And if I now do k get pods the pods. And if I now do k get pods then we see there are no resources left. then we see there are no resources left. then we see there are no resources left. So I will just create a new pod.l file So I will just create a new pod.l file So I will just create a new pod.l file by writing nvim by writing nvim by writing nvim pod.yml. And here is my pedyl file where pod.yml. And here is my pedyl file where pod.yml. And here is my pedyl file where I pasted in the exact same YAML that I I pasted in the exact same YAML that I I pasted in the exact same YAML that I had here in my little document. So now had here in my little document. So now had here in my little document. So now we have a YAML manifest to create a pod. we have a YAML manifest to create a pod. we have a YAML manifest to create a pod. And how are we going to deploy this? And how are we going to deploy this? And how are we going to deploy this? Well, for this we use the cubectl apply Well, for this we use the cubectl apply Well, for this we use the cubectl apply command. You do command. You do command. You do cubectl apply and then -f because we're cubectl apply and then -f because we're cubectl apply and then -f because we're going to give it a file and then we're going to give it a file and then we're going to give it a file and then we're going to uh give it the pod.l demo file going to uh give it the pod.l demo file going to uh give it the pod.l demo file that we just created. You can also do that we just created. You can also do that we just created. You can also do cubectl create with the f, but apply is cubectl create with the f, but apply is cubectl create with the f, but apply is better because if you use apply and you better because if you use apply and you better because if you use apply and you make changes to the file, it will make changes to the file, it will make changes to the file, it will actually diff the resources. It will actually diff the resources. It will actually diff the resources. It will pick up the differences and then it will pick up the differences and then it will pick up the differences and then it will apply them accordingly. So always use apply them accordingly. So always use apply them accordingly. So always use the apply command. So if I now do k get the apply command. So if I now do k get the apply command. So if I now do k get pods again, we see that my we have our pods again, we see that my we have our pods again, we see that my we have our web app um pods here. Now if I do k get web app um pods here. Now if I do k get web app um pods here. Now if I do k get pods show labels for example then we see pods show labels for example then we see pods show labels for example then we see that this label that it has gotten is that this label that it has gotten is that this label that it has gotten is app is equals web just like we put in
-
app is equals web just like we put in app is equals web just like we put in our yaml manifest. So that is the second our yaml manifest. So that is the second our yaml manifest. So that is the second way how we can deploy pods on way how we can deploy pods on way how we can deploy pods on kubernetes. So the advantage of yaml is kubernetes. So the advantage of yaml is kubernetes. So the advantage of yaml is that it gives you complete control over that it gives you complete control over that it gives you complete control over every aspect of your pod and you can every aspect of your pod and you can every aspect of your pod and you can version control these files and reuse version control these files and reuse version control these files and reuse them across different environments. And them across different environments. And them across different environments. And this is where you can get into git ops this is where you can get into git ops this is where you can get into git ops which is a which I have created videos which is a which I have created videos which is a which I have created videos about on my channel as well that you can about on my channel as well that you can about on my channel as well that you can look up. So let's look at an example look up. So let's look at an example look up. So let's look at an example with multiple containers and a shared with multiple containers and a shared with multiple containers and a shared volume. So this is a more elaborate one. volume. So this is a more elaborate one. volume. So this is a more elaborate one. So we have again the list of containers So we have again the list of containers So we have again the list of containers here but here instead of just one we here but here instead of just one we here but here instead of just one we have an extra container here. In this have an extra container here. In this have an extra container here. In this case, it's a content generator that will case, it's a content generator that will case, it's a content generator that will create some content for the index html create some content for the index html create some content for the index html for the enginex pod. So you are you're for the enginex pod. So you are you're for the enginex pod. So you are you're basically giving it the content that it basically giving it the content that it basically giving it the content that it should serve uh that the enginex web should serve uh that the enginex web should serve uh that the enginex web server should serve to the user. And in server should serve to the user. And in server should serve to the user. And in order to have the data being shared order to have the data being shared order to have the data being shared across these pods, we are giving it a across these pods, we are giving it a across these pods, we are giving it a volume and volume volume and volume volume and volume mount. So this way these containers can mount. So this way these containers can mount. So this way these containers can share the same storage. So if you're a share the same storage. So if you're a share the same storage. So if you're a beginner and you see this and all of beginner and you see this and all of beginner and you see this and all of this is a bit overwhelming to you, I this is a bit overwhelming to you, I this is a bit overwhelming to you, I fully understand. It was really hard for fully understand. It was really hard for fully understand. It was really hard for me in the beginning to wrap my mind me in the beginning to wrap my mind me in the beginning to wrap my mind around this and that is why I created my around this and that is why I created my around this and that is why I created my CubeCraft DevOps community. So this is a CubeCraft DevOps community. So this is a CubeCraft DevOps community. So this is a place where you can learn Kubernetes place where you can learn Kubernetes place where you can learn Kubernetes from senior people like me who are there from senior people like me who are there from senior people like me who are there to uh answer questions all day long. But
-
to uh answer questions all day long. But to uh answer questions all day long. But also I created a Kubernetes fundamentals also I created a Kubernetes fundamentals also I created a Kubernetes fundamentals course which is different than all the course which is different than all the course which is different than all the other courses because I set it up so other courses because I set it up so other courses because I set it up so that we are sitting together as if we're that we are sitting together as if we're that we are sitting together as if we're sitting together in the same room with sitting together in the same room with sitting together in the same room with our laptops and I'm sitting there our laptops and I'm sitting there our laptops and I'm sitting there teaching you this as we go along. So teaching you this as we go along. So teaching you this as we go along. So it's very hands-on just like this video. it's very hands-on just like this video. it's very hands-on just like this video. It's a lot of um practical application. It's a lot of um practical application. It's a lot of um practical application. We're constantly running cubectl We're constantly running cubectl We're constantly running cubectl commands and I'm explaining it as we go commands and I'm explaining it as we go commands and I'm explaining it as we go along. So as you see here the the along. So as you see here the the along. So as you see here the the section on pods alone is 50 minutes and section on pods alone is 50 minutes and section on pods alone is 50 minutes and then there's another one where I go then there's another one where I go then there's another one where I go deeper into the YAML which is another 30 deeper into the YAML which is another 30 deeper into the YAML which is another 30 minutes. So it's a very it's very deep minutes. So it's a very it's very deep minutes. So it's a very it's very deep it's very elaborate. it's very elaborate. it's very elaborate. So in this course you will learn these So in this course you will learn these So in this course you will learn these aspects of um creating multiple aspects of um creating multiple aspects of um creating multiple containers. You can will learn about containers. You can will learn about containers. You can will learn about storage and networking. So I I've gotten storage and networking. So I I've gotten storage and networking. So I I've gotten really good feedback on this course and really good feedback on this course and really good feedback on this course and I highly recommend you check it out. Now I highly recommend you check it out. Now I highly recommend you check it out. Now we have been creating YAML files just we have been creating YAML files just we have been creating YAML files just from a text editor. But the cool thing from a text editor. But the cool thing from a text editor. But the cool thing is with cubectl we can also generate is with cubectl we can also generate is with cubectl we can also generate YAML from the commands. So it's very YAML from the commands. So it's very YAML from the commands. So it's very helpful when you're learning Kubernetes helpful when you're learning Kubernetes helpful when you're learning Kubernetes that you can use the dry run command and that you can use the dry run command and that you can use the dry run command and then output things as YAML. So let's then output things as YAML. So let's then output things as YAML. So let's check out what that looks like. So I check out what that looks like. So I check out what that looks like. So I have this command here that I copied have this command here that I copied have this command here that I copied over and I will just delete the pods over and I will just delete the pods over and I will just delete the pods again and I will remove my pod.yml.
-
again and I will remove my pod.yml. again and I will remove my pod.yml. YAML and if I now do this so what we see YAML and if I now do this so what we see YAML and if I now do this so what we see here is cubectl run again we're going to here is cubectl run again we're going to here is cubectl run again we're going to run engineext pod with the im image run engineext pod with the im image run engineext pod with the im image engineext but here there is this dry run engineext but here there is this dry run engineext but here there is this dry run is client so it will dry run this is client so it will dry run this is client so it will dry run this command it won't actually apply it to command it won't actually apply it to command it won't actually apply it to the cluster it will just do as if and the cluster it will just do as if and the cluster it will just do as if and then we output this as yl into a file so then we output this as yl into a file so then we output this as yl into a file so let's check out what this looks like let's check out what this looks like let's check out what this looks like poty and here we see that we have poty and here we see that we have poty and here we see that we have generated the the YAML object. We didn't generated the the YAML object. We didn't generated the the YAML object. We didn't have to type all of this out. It has have to type all of this out. It has have to type all of this out. It has generated for us. And here we see it has generated for us. And here we see it has generated for us. And here we see it has a few extra things that we didn't have a few extra things that we didn't have a few extra things that we didn't have in our first YAML. So this also means in our first YAML. So this also means in our first YAML. So this also means that they are not required. So I can that they are not required. So I can that they are not required. So I can just delete this to clean it up a little just delete this to clean it up a little just delete this to clean it up a little bit. But here here we see that we have a bit. But here here we see that we have a bit. But here here we see that we have a very simple pod. That we generated from very simple pod. That we generated from very simple pod. That we generated from the cubectl command. And you can do the the cubectl command. And you can do the the cubectl command. And you can do the same with services with deployments etc. same with services with deployments etc. same with services with deployments etc. You can do so many things. You can You can do so many things. You can You can do so many things. You can generate so much YAML just from the generate so much YAML just from the generate so much YAML just from the cubectl command which is extremely cubectl command which is extremely cubectl command which is extremely useful if you're going for the CKA, CKD useful if you're going for the CKA, CKD useful if you're going for the CKA, CKD or the CKS certifications because in or the CKS certifications because in or the CKS certifications because in those practical certifications you have those practical certifications you have those practical certifications you have to be to be to be fast. So this workflow is really useful fast. So this workflow is really useful fast. So this workflow is really useful for learning. You can generate the YAML for learning. You can generate the YAML for learning. You can generate the YAML structure and then customize it to your structure and then customize it to your structure and then customize it to your needs before applying it. And you might needs before applying it. And you might needs before applying it. And you might be wondering why don't we just use the be wondering why don't we just use the be wondering why don't we just use the cubectl create command. So there are cubectl create command. So there are cubectl create command. So there are there is also the cubectl create command
-
there is also the cubectl create command there is also the cubectl create command that we can check out help. So why were that we can check out help. So why were that we can check out help. So why were we using cubectl run if there is a we using cubectl run if there is a we using cubectl run if there is a cubectl create command because creating cubectl create command because creating cubectl create command because creating pods is what we're doing right? Well pods is what we're doing right? Well pods is what we're doing right? Well let's check it out. Let's see what let's check it out. Let's see what let's check it out. Let's see what happens if I run cubectl create pod happens if I run cubectl create pod happens if I run cubectl create pod engine xx pod with the image engineext. engine xx pod with the image engineext. engine xx pod with the image engineext. Let's see what Let's see what Let's see what happens. Unknown flag image. So cubectl happens. Unknown flag image. So cubectl happens. Unknown flag image. So cubectl does not accept the the pod object. It does not accept the the pod object. It does not accept the the pod object. It only a it only is um accepting things only a it only is um accepting things only a it only is um accepting things like cluster roles, crown jobs, like cluster roles, crown jobs, like cluster roles, crown jobs, deployments jobs but not pods. pods are deployments jobs but not pods. pods are deployments jobs but not pods. pods are se are separate from that and they have se are separate from that and they have se are separate from that and they have their own com their own command called their own com their own command called their own com their own command called cubectl cubectl cubectl run. Now the truth is in real production run. Now the truth is in real production run. Now the truth is in real production environments you rarely create environments you rarely create environments you rarely create standalone pods directly. Instead you standalone pods directly. Instead you standalone pods directly. Instead you typically use deployments which manage typically use deployments which manage typically use deployments which manage pods for you and provide additional pods for you and provide additional pods for you and provide additional features like scaling and rolling features like scaling and rolling features like scaling and rolling updates.
-
updates. updates. However, when you are just starting out However, when you are just starting out However, when you are just starting out or testing applications, running pods is or testing applications, running pods is or testing applications, running pods is where you can where you can where you can begin. Understanding pods is essential begin. Understanding pods is essential begin. Understanding pods is essential since they are the foundation of all since they are the foundation of all since they are the foundation of all workloads in Kubernetes. And when you workloads in Kubernetes. And when you workloads in Kubernetes. And when you understand those, the next step is to understand those, the next step is to understand those, the next step is to learn about deployments. And these are learn about deployments. And these are learn about deployments. And these are covered in great detail in my Kubernetes covered in great detail in my Kubernetes covered in great detail in my Kubernetes fundamentals course in CubeCraft. fundamentals course in CubeCraft. fundamentals course in CubeCraft. And just to give you an impression, the And just to give you an impression, the And just to give you an impression, the the module on deployments is an hour the module on deployments is an hour the module on deployments is an hour long just by itself. Then we go into long just by itself. Then we go into long just by itself. Then we go into namespaces and uh the example namespaces and uh the example namespaces and uh the example application. So this is all already two application. So this is all already two application. So this is all already two hours of deep dive into deployments and hours of deep dive into deployments and hours of deep dive into deployments and how to deploy applications using how to deploy applications using how to deploy applications using deployments. But next comes networking. deployments. But next comes networking. deployments. But next comes networking. There is storage. There is Helm. It's There is storage. There is Helm. It's There is storage. There is Helm. It's everything that you need to know to get everything that you need to know to get everything that you need to know to get started with Kubernetes. And you don't started with Kubernetes. And you don't started with Kubernetes. And you don't only get access to the courses, but you only get access to the courses, but you only get access to the courses, but you also get access to a community of over also get access to a community of over also get access to a community of over 500 members that you can ask questions 500 members that you can ask questions 500 members that you can ask questions when you get stuck. And that is the when you get stuck. And that is the when you get stuck. And that is the great thing about my DevOps community great thing about my DevOps community great thing about my DevOps community that if I had this in the beginning, I that if I had this in the beginning, I that if I had this in the beginning, I would have learned even faster because would have learned even faster because would have learned even faster because if I would be stuck on a problem, if I would be stuck on a problem, if I would be stuck on a problem, instead of Googling around for for instead of Googling around for for instead of Googling around for for hours, I could just ask the question in hours, I could just ask the question in hours, I could just ask the question in an active community where people are an active community where people are an active community where people are ready to help you. And I'm in there ready to help you. And I'm in there ready to help you. And I'm in there every day. You can see my activity here.
-
every day. You can see my activity here. every day. You can see my activity here. I have um almost a full green bar here I have um almost a full green bar here I have um almost a full green bar here for over a year now. So, um I'm here to for over a year now. So, um I'm here to for over a year now. So, um I'm here to help you. If you want to learn from me, help you. If you want to learn from me, help you. If you want to learn from me, join CubeCraft at school.com/cubcraft.
Summary
The main theme is deploying applications within a Kubernetes cluster using pods, which are the fundamental building blocks. The transcript highlights the `kubectl run` command as the quickest and easiest method for creating pods, demonstrating its use for deploying an Nginx pod and then showing how to expose ports and set environment variables. The practical takeaway is that `kubectl run` is a versatile tool for quickly getting basic pods deployed for testing or initial setup.