rewrite some questions, add tips
This commit is contained in:
parent
f0df34abe1
commit
568b9cac6f
|
@ -108,12 +108,14 @@ $ minikube dashboard
|
|||
## Exercises
|
||||
|
||||
1. Deploy a `pod` containing nginx. The image name is `nginx`, see: https://hub.docker.com/_/nginx/
|
||||
2. Try accessing the pod `simple-service` from outside of k8s, without changing the configuration. Do you manage to do it?
|
||||
* If yes, how did you manage to do it?
|
||||
* If no, what do you think is missing?
|
||||
2. Do you think you can access the pod `simple-service` from outside of k8s, *without changing the configuration*?
|
||||
|
||||
## Clean up
|
||||
|
||||
```bash
|
||||
$ kubectl delete pod --all
|
||||
```
|
||||
```
|
||||
|
||||
## Answers
|
||||
|
||||
2. Nop, the pod is only visible from the inside of the cluster
|
|
@ -141,12 +141,14 @@ Remember the command `kubectl describe deployment`.
|
|||
|
||||
1. Deploy multiple nginx. The image name is `nginx`, see: https://hub.docker.com/_/nginx/
|
||||
2. Play with the scaling up/down & the deployment of new versions
|
||||
3. Try accessing your `deployment` of nginx from outside of k8s, without changing the configuration. Do you manage to do it?
|
||||
* If yes, how did you manage to do it?
|
||||
* If no, what do you think is missing?
|
||||
3. Do you think you can access your `deployment` of nginx from outside of k8s, *without changing the configuration*?
|
||||
|
||||
## Clean up
|
||||
|
||||
```bash
|
||||
$ kubectl delete deployment,rs,pod --all
|
||||
```
|
||||
```
|
||||
|
||||
## Answers
|
||||
|
||||
3. Nop, same as the pod. A `deployment` only creates pods, it doesndo anything else
|
|
@ -179,3 +179,9 @@ With this configuration we have a `deployment` that manages pods. A `service` th
|
|||
```bash
|
||||
$ kubectl delete ingress,service,deployment,rs,pod --all
|
||||
```
|
||||
|
||||
## Answers
|
||||
|
||||
2. You need to add the metadata `nginx.ingress.kubernetes.io/rewrite-target: /` to the ingress
|
||||
* Don't forget to create 2 deployments and 2 services.
|
||||
* You can either change your `/etc/hosts` to add the name resolution for `foo.bar.com`, or use `curl http://YOUR-IP -H "Host: foo.bar.com"`
|
Loading…
Reference in New Issue