Skip to content

Latest commit

 

History

History
96 lines (59 loc) · 2.21 KB

File metadata and controls

96 lines (59 loc) · 2.21 KB

Warmup: Deployments, History, and Services!

image

Welcome to your Kubernetes Rollout & Scaling Warmup Challenge! Your mission, should you choose to accept it, is to:

  1. Interact with a deployment named mufasa in the namespace king-of-lions.
  2. Use kubectl to accomplish tasks related to rollbacks, scaling, and exposing the deployment.

TASK 1

Run this command to create a deployment called mufasa in the namespace king-of-lions:

student@bchd~$: drill deploy-rollbacks

Apparently, the current version is broken. Check the deployment history and rollback to a version that actually works.

Hint for Task 1

The kubectl rollout history and kubectl rollout undo commands are what you need here!

Click here for the solution to Task 1!
kubectl rollout history -n king-of-lions deployment mufasa
kubectl rollout undo -n king-of-lions deployment mufasa

TASK 2

Increase the number of pods in the deployment mufasa in the namespace king-of-lions to 5.

Hint for Task 2

You can use either kubectl scale or kubectl edit to get a quick win on this task!

Click here for the solution to Task 2!
kubectl scale -n king-of-lions deployment mufasa --replicas=5

OR

kubectl edit -n king-of-lions deployment mufasa

Then find the line:

replicas: 2

Change 2 to 5, and save the changes.


TASK 3

Expose the deployment mufasa in the namespace king-of-lions with a service! You do not have to write a manifest to accomplish this.

Hint for Task 3

Use the kubectl expose command to create a service for the deployment.

Click here for the solution to Task 3!
kubectl expose -n king-of-lions deployment mufasa

Teardown

Remove what you've built!

student@bchd~$: teardown deploy-rollbacks