RUVIDEO
Поделитесь видео 🙏

kubernetes tutorials for beginners part 2

Kubernetes kubectl tutorial for beginners. Learn how to create a kubernetes pod using kubectl create command from the CLI. It is fundamental to getting started in kubernetes.

The full blog is located at:
https://www.cloudtechnologyexperts.com/create-multi-container-kubernetes-pods/

Here is the transcript:

Hey Damian here from cloud technology experts.

In the previous video, I showed you how to create a pod from the CLI using kubectl run. In this video,I will show you how to use kubectl create to create a pod. For this, we would first need to create a manifest file. The manor difference between using kubectl run and kubectl create is that. With kubectl run you can
Create one pod containing only one container
A deployment object is automatically created
No manifest file is needed

With kubectl create:
You will be able to create a pod containing as many containers as you specify
No deployment object is created except you explicitly specify a deployment object
A manifest file created in Yaml or json is needed. This means you will need to be knowledgeable about yaml or json syntax. I will provide another video on creating manifest file in yaml but for this demo, I will use a simple pod manifest file created in yaml syntax.

As best-practice, note that multi-containers Kubernetes pods does not apply to all situations and should be used only when truly needed. This is because:
1. Containers inside the same Pod are co-located and so cannot be spread to different hosts
2. Containers inside the same pod cannot be scaled separately even if needed because containers always share the same fate.
3. Containers are tightly-coupled but loosely-coupled may be preferable sometimes.

The scenarios that are best for multi-containers Kubernetes pods are:
1.for performance reasons: for example redis cache and web-server can be tightly coupled in a pod for better performance
2. health-check: one of the pod can be used to monitor the other when tightly coupled
3. log-collecting processes-one pod tightly coupled with another can be used to collect the logs of the other


So let’s get started
Here is the yaml syntax file

Again, we are not going to discuss yaml syntax here but we will do that in another video.

Now lets create the pods
kubectl create -f example.yaml
kubectl get pods

Here it shows the pod with 2 containers running. What do you notice with the name of the pod? Notice that no random number is generated and added to the name we specified, unlike using kubectl run command

Let's get more details about the containers inside the pod
Kubectl describe pods redis-nginx
Here is the container sections and we can see the redis and nginx containers running.

And finally let’s confirm that a deployment object was not created
Kubectl get deploy

And let’s delete the pod and see that it’s no longer running.
Kubectl delete pod
Kubectl get pod



Ok. This is what I wanted to show you in this video.
How to create pods using kubectl create command. Note that in this case you can create as many pods as you want.

2. Also notice that a deployment object was not created which means that the pods are not being monitored so each time you delete the pods the pods remain deleted. Later on,in the replica set and deployment videos, we will show you how to monitor our pods using deployment and replicaset objects.


I hope you like this video, be sure to leave a comment, like the video below and subscribe to our youtube channel for more cloud related videos just like this one.
Again, Damian from Cloud Technology Experts and thank you for watching.

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «kubernetes tutorials for beginners part 2», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.