1 00:00:00,000 --> 00:00:11,440 In this video, you'll learn how to run a container in Kubernetes. 2 00:00:11,440 --> 00:00:17,480 Easy access to Kubernetes is provided by different cloud providers, or by using Minikube. 3 00:00:17,480 --> 00:00:22,240 To get to know Kubernetes, you can deploy a Getting Started Kubernetes cluster in Google 4 00:00:22,240 --> 00:00:24,000 Cloud as well. 5 00:00:24,000 --> 00:00:29,879 And after deploying the Kubernetes cluster, you'll use the kubectl command to manage Kubernetes 6 00:00:29,879 --> 00:00:31,000 containers. 7 00:00:31,000 --> 00:00:35,560 No matter how you run Kubernetes, kubectl is always the way. 8 00:00:35,560 --> 00:00:40,439 Now it's not the purpose of Linux Plus to make you a Kubernetes guru. 9 00:00:40,439 --> 00:00:44,520 Kubernetes is complex and really requires additional training. 10 00:00:44,520 --> 00:00:51,040 But I do want to show you how to run an orchestrated container in Minikube, which is a nice Kubernetes 11 00:00:51,040 --> 00:00:54,619 platform which you can use for testing purposes. 12 00:00:54,619 --> 00:00:58,040 So on this virtual machine, I have Minikube available. 13 00:00:58,040 --> 00:01:02,340 The only thing I need to do is Minikube start. 14 00:01:02,340 --> 00:01:05,860 And my first test is kubectl get all. 15 00:01:05,860 --> 00:01:10,180 kubectl is normally used to make connection to a Kubernetes cluster. 16 00:01:10,180 --> 00:01:14,940 And oh my goodness, here we can see that many resources have been created in this Kubernetes 17 00:01:14,940 --> 00:01:15,940 cluster. 18 00:01:15,940 --> 00:01:19,139 Yes, I've used this cluster before for other demos. 19 00:01:19,139 --> 00:01:25,580 Now I'm going to use kubectl run myapp, which is going to run a container image with the 20 00:01:25,580 --> 00:01:26,580 name myapp. 21 00:01:27,120 --> 00:01:29,080 But I need to specify which image. 22 00:01:29,080 --> 00:01:30,599 Well, that's easy. 23 00:01:30,599 --> 00:01:32,959 Minus minus image is nginx. 24 00:01:32,959 --> 00:01:35,480 And that is creating the pod myapp. 25 00:01:35,480 --> 00:01:39,080 Now I can use kubectl get pod myapp. 26 00:01:39,080 --> 00:01:40,139 And what do we see? 27 00:01:40,139 --> 00:01:42,559 We see that the pod myapp is running. 28 00:01:42,559 --> 00:01:48,839 Ready 1 slash 1 means that there is one container running in this pod and the application is 29 00:01:48,839 --> 00:01:49,839 available. 30 00:01:49,839 --> 00:01:55,199 Now that's enough for the minimal introduction to Kubernetes that I wanted to provide here.