Welcome to your Kubernetes Rollout & Scaling Warmup Challenge! Your mission, should you choose to accept it, is to:
- Interact with a deployment named mufasa in the namespace
king-of-lions. - Use
kubectlto accomplish tasks related to rollbacks, scaling, and exposing the deployment.
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 mufasaIncrease 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=5OR
kubectl edit -n king-of-lions deployment mufasaThen find the line:
replicas: 2Change 2 to 5, and save the changes.
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 mufasaRemove what you've built!
student@bchd~$: teardown deploy-rollbacks
