The focus of this lab is to be able to debug and access a cluster by get a pods yaml or by inspecting it's "description" through describe
. Additionally, you will rollout a deployment and roll it back.
-
Setup Lab 4 by running
./setup-lab4.sh
. (without looking at sipt yet) -
Question to answer about cluster:
How many pods have the label
app=front-end
? How many pods in total? How many pods infoo
namespace? How many pods with labelapp=front-end
in entire cluster? Display all of them? -
Create and run Deployment file which matches the nginx pods with the
app=front-end
label with replicas = 4. -
Change the image to
nginx:1.9.1
for the deploymenthint:
k set image deploy nginx nginx=nginx:1.9.1
-
Looking at deployment rollout history
-
Undo the last rollout
-
Create a Job that will run every 2 mins and print to STDOUT a random number. What is the value of the 1st random number?
hint:
shuf -i 0-999 -n1
will print a random number 0 - 999 hint:*/2 * * * *
is a cron for every 2 mins