Hi and welcome to this solution video for the practice test of rolling updates and rollbacks
so in this lab we have a total of 13 questions for the first one.
We have deployed a simple web application inspect the parts and services wait for the application to
be fully deployed and you can view the application using the link about the terminal
so if you run a cube CDL get parts we see that four parts have been created for us using the deployment
front end which in turn uses the replica set and as you can see it has four desired and four ready pods
so now let's click on the above portal and here you can see a blue webpage hello from the front.
This is the name of the pod and the application vision as we won
what is the current color of diva application so we know that it's blue run the script named cool hyphen
test to send multiple requests to test diva application take a note of the output so that as a cool
life and test out as each shell script which is in the slash root directory so when we are on that we
can see that the application was and we want color as equal to blue
inspect the deployment and identify the number of parts deployed by it.
We know that it's for what container images used to deploy the applications.
To do this we will run the cube it'll describe command so we are running a describe against the deployment
called front end and here we can see that the image is called Cloud slash whereby font color vision
inspect the deployment and identify the current strategy so if we go to the governor is documentation
for deployment and read up about the strategy you'll see that there are two types of strategy available
want us to recreate or rolling update the default value is falling update
and here within the described command for the deployment you can look for strategy type and it states
here that it's rolling update
if you were to upgrade the application now what would happen.
So if you have control the teary lecture you would know that the all the parts would not be taken down
at the same time when we use a upgrade of the specific deployment.
So in this case because it said to a rolling update parts are upgraded few at a time so that should
be the correct answer
so far.
Question number 8 let us try to do that.
We will try to upgrade the application by changing the image to quote cloud Web life and color vision
to do not delete or recreate the deployment only said the new image so one of the ways to do this is
to use the cube CTO.
Edit deployment command
so I've located the image here and I'm going to change it to read to and as soon as you make that change
would see that a new port has been spun up and the old ones are being deleted.
Now you will see that some of the code commands are hitting the blue web page which is version 1 and
the other ones are going to green.
This is because the strategy is set to rolling update.
Few of them are going to the new pod which has been deployed whereas some of the other requests are
going to the old one and this would be done until all the ports has been replaced by the new image
up to how many ports can be down for the grid at a time.
Consider the current strategy settings and the number of pods is equal to four
so let's run the cube still describe deployment again and you would see that the ruling updates strategy
mentions 25 percent max unavailable which means that 25 percent of the pods can be unavailable at any
given point of time during the upgrade.
So since the maximum number of pods is for the number of pauses that can go down this one
Now let's change the deployment strategy to recreate
let's run the cutesy deal edit deployment again and here will have to change the strategy type to recreate
we can remove the section related to ruling object because that's not relevant for type recreate
and now we'll see if this file.
Now if you're on describe
you'll see that the strategy's diaper set to recreate.
Now let's try to upgrade the deployment with a new image.
Vision we three.
Same as before.
We will use the Edit Come on
we'll change the images to version 3.
Now as soon as we make that change you'll see that all the ports are being terminated of vision V2
which means that this web page will not be available until the new part has been spun up
and if you run the call test you'll see a lot of these requests are getting field nor does the failures
wait for the new application to be really.
Now we have completed the quiz but let's wait for this group to return at least once successful return.
So here we go.
We have got a few pots which are up which means that the call is working and we have got a successful
Web page.
So now all the four pots are now running straight and this is running the wash and we three of the image.
That's it for this video.
Thank you for joining me on this solution lab and I hope you find it useful.
I'll see you in the next one.