This is the solution video for the multi container ports lab.
So for the first question, we have to identify the number of containers running in the red pod.
So let's try and keep still, get parts.
And under the red column, you'll see that zero out of three already, so the total number of containers
and the red bottles, three.
Identify the name of the containers running in the blue pod.
So let's run the same as before, you'll see that another part has been created called Blue, which
would have two containers in it.
And let's try and Cube still describe part blue.
And look at the name of the continuous.
So you'll see that there is one called Navy and the other one is still.
Create a multi container port with two containers.
The name should be yellow container, one should be called lemon.
And with the image of the Xbox, the to name is gold and continued to should use Raiders image, so
let's create that using Kubasik children.
Yellow, the name of the port, and we'll use the image for the first container, which is Zyvox.
And restart as equal to never to make sure that it's the pod which is created by this command and will
use the dash as dry run national yaml and.
Redirected to a file.
Now let's update the file.
So it has one container already, we can add multi containers imperatively, so we'll have to do it
this way, redirect the output of the command that we ran to a file and then open it and update it so
that we can add additional containers.
So the first thing we have to do is change the name of the container to lemon because the name yellow
is out of the pod.
Now add additional image and the name for the second container.
So the image is reduced and the name should be gold.
That should be it, let's create this spot now.
The board has been created, we get on Kubasik, still describe pod yellow and inspected.
So you can see the gold container here.
There it is, image and the lemon container to be Zyvox image.
Let's inspect the answer.
Now for the next question, we have deployed an application logging stack in the elastic stack namespace
or inspected.
So let's go back and check out the new namespace that has been created as a new one called Elastic Dastagir,
which has been created three minutes ago.
Now let's try and cube steel dash and elastic stack get parts and service so you'll see that there are
three parts in Total App Elastic and Kibwana and there are two services created, one for ElasticSearch
and one for Kibwana.
Both are nopal type services.
So click on Orkan.
Inspect the Kibwana, you are using the link, you shouldn't see any logs for now, so let's go and
click on the URL called Kibwana and wait for it to load up.
And once it's loaded up, you can click on this cover and you'll see that there is nothing to index
here.
So there's no data and that as of now.
So let's move on to the next question will be creating a sidecar container.
So there is an app part and the elastic namespace, let's first identify the number of containers in
it, so we'll run the same commanders before Kubek till Dash and get part.
But you can already see that it has got one out of one container.
So the answer is one.
The application outputs log to the file log about log of the logs and try to identify the user having
issues with the login.
So we can do this by running you your logs, commander, as well, so let's do that.
Secure an elastic stack logs app and you can see the logs print at your screen and looks like user five
has failed to log in as the account is logged due to many failed attempts.
So the answer should be user five.
Next, let's edit the airport and add a sidecar, continue to it so that it can send logs to ElasticSearch.
More dialogue, volume to be site car container.
So we're going to create an additional container in the app pod and the name of the container is Sidecar.
There's the image which has been provided file be configured, and we're also going to attach a volume
to the container.
That's something you can see in the architecture diagram below.
So we are going to add a sidecar Volbeat container to the app port and all of those are some the elastic
stack namespace.
So just as before, let's get the definition filed first for the app part.
Police, the national YAML.
And redirected to a file called App, Not YAML.
Now we can delete the app pod, we don't know, we don't need it anymore.
Wait for it to dominate completely.
And now let's update the poor definition.
Now you'll see that the container.
Which was already there by the name of app has called the volume mount, the name of the volume mount
as log dash volume.
And it's mounted at slashed log in the airport.
So this is the location we checked earlier using the cube catalogues.
Come on, this is where the logs were created.
Now, let's add an additional.
Container.
Now, put that in the wrong place, so elated that.
To create a new image.
Pisit here.
And the name of the new container should be Sidecar.
And it should also have a volume mount to add the volume mounts.
And the monopod will copy it from the question.
It's like water logged even some later.
And the name of the volume is Logush Volume.
And here is the William definition file that's using a hotspot.
Which is Lajoie log web app that's already being used by the app part earlier.
Let's save this file and try to create the.
So it looks like I made a mistake on line 19.
So let's correct that.
And Islamistic.
The spacing was incorrect.
Let's save that and try to recreate the part.
But, Sam, the pod has been created.
Let's move on to the final question.
So we can inspect the cabana right now and we should be able to see logs.
So let's go back to the Kibwana dashboard.
Click on Discover.
And here we can create a new index pattern, so I'm just going to use Oliker.
So enter Star.
Next step and create the index battle.
So, again, they use a time stamp or we can create it at a later point.
Our purpose is just to see if the logs are being shipped from ElasticSearch to Kobana.
So once the index pattern has been created, we can go back to discover.
And here we can see the logs from our pod.
So click on OK?
Thanks for joining me and the solution we do.
I'll see you in the next one.