Add a couple of questions and exercises

SSIA
This commit is contained in:
abregman
2021-09-01 01:02:32 +03:00
parent 0f0167afd2
commit ab61a49f84
9 changed files with 473 additions and 64 deletions

View File

@ -0,0 +1,12 @@
## "Killing" Containers
1. Run Pod with a web service (e.g. httpd)
2. Verify the web service is running with the `ps` command
3. Check how many restarts the pod has performed
4. Kill the web service process
5. Check how many restarts the pod has performed
6. Verify again the web service is running
## After you complete the exercise
* Why did the "RESTARTS" count raised?

View File

@ -0,0 +1,12 @@
## "Killing" Containers - Solution
1. Run Pod with a web service (e.g. httpd) - `kubectl run web --image registry.redhat.io/rhscl/httpd-24-rhel7`
2. Verify the web service is running with the `ps` command - `kubectl exec web -- ps`
3. Check how many restarts the pod has performed - `kubectl get po web`
4. Kill the web service process -`kubectl exec web -- kill 1`
5. Check how many restarts the pod has performed - `kubectl get po web`
6. Verify again the web service is running - `kubectl exec web -- ps`
## After you complete the exercise
* Why did the "RESTARTS" count raised? - `because we killed the process and Kubernetes identified the container isn't running proprely so it performed restart to the Pod`