Skip to content

Commit 348d5f2

Browse files
authored
chore: cleanup md, remove empty sections (#32)
1 parent 9b721db commit 348d5f2

File tree

15 files changed

+29
-66
lines changed

15 files changed

+29
-66
lines changed

Diff for: 05-pods/README.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ But it has a base assumption that a `pod` can be killed whenever it wants to. So
1010

1111
## First pod
1212

13-
Let's start to deploy this docker image <https://hub.docker.com/r/mhausenblas/simpleservice/>.
14-
It's a stateless python JSON API that answers on:
13+
Let's start to deploy the docker image [mhausenblas/simpleservice](https://hub.docker.com/r/mhausenblas/simpleservice/). It's a stateless python JSON API that answers on:
1514

1615
* `/env`
1716
* `/info`
@@ -49,7 +48,7 @@ $ kubectl apply -f 05-pods/01-simple-pod.yml
4948
pod "simple-pod" created
5049
```
5150

52-
We also could have used the `kubectl create -f ...`. But it's better to have a declarative approach in Kubernetes rather than an imperative one, [see]( https://medium.com/bitnami-perspectives/imperative-declarative-and-a-few-kubectl-tricks-9d6deabdde).
51+
We also could have used the `kubectl create -f ...`. But it's better to have a declarative approach in Kubernetes rather than an imperative one, [see](https://medium.com/bitnami-perspectives/imperative-declarative-and-a-few-kubectl-tricks-9d6deabdde).
5352

5453
## `kubectl get`
5554

@@ -107,7 +106,7 @@ minikube dashboard
107106

108107
## Exercises
109108

110-
1. Deploy a `pod` containing nginx. The image name is `nginx`, see: <https://hub.docker.com/_/nginx/>
109+
1. Deploy a `pod` containing nginx. The image name is `nginx`, see: https://hub.docker.com/_/nginx/.
111110
2. Do you think you can access the pod `simple-service` from outside of Kubernetes, *without changing the manifest*?
112111

113112
## Clean up
@@ -118,7 +117,7 @@ kubectl delete pod --all
118117

119118
## Answers
120119

121-
For 2. Nop, the pod is only visible from the inside of the cluster
120+
For 2), no, the pod is only visible from the inside of the cluster.
122121

123122
## Links
124123

Diff for: 06-label-annotation/README.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ Valid label values must be 63 characters or less and must be empty or begin and
1616

1717
## Labels in action
1818

19-
Apply the pod `06-label-annotation/01-simple-pod.yml`. It is the same as `05-pods/01-simple-pod.yml` but with 2 labels:
19+
Apply the manifest [01-simple-pod.yml](01-simple-pod.yml). It is the same as [05-pods/01-simple-pod.yml](../05-pods/01-simple-pod.yml) but with 2 labels:
2020

2121
* `env`: `production`
2222
* `tier`: `backend`
2323

24-
Apply the pod `06-label-annotation/02-nginx.yml`. It is a simple nginx with 2 labels:
24+
Apply the manifest [02-nginx.yml](02-nginx.yml). It is a simple nginx with 2 labels:
2525

2626
* `env`: `production`
2727
* `tier`: `frontend`
@@ -47,10 +47,6 @@ nginx 1/1 Running 0 1m
4747

4848
Those queries we call them `selector` in the Kubernetes jargon. We will use them later on with deployments.
4949

50-
## Exercises
51-
52-
Nothing to see here.
53-
5450
## Clean up
5551

5652
```sh

Diff for: 07-deployment/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ Remember the command `kubectl describe deployment`.
146146

147147
## Exercises
148148

149-
1. Deploy multiple nginx. The image name is `nginx`, see: <https://hub.docker.com/_/nginx/>
150-
2. Play with the scaling up/down & the deployment of new versions
149+
1. Deploy multiple nginx. The image name is `nginx`, see: https://hub.docker.com/_/nginx/.
150+
2. Play with the scaling up/down & the deployment of new versions.
151151
3. Do you think you can access your `deployment` of nginx from outside of Kubernetes, *without changing the manifest*?
152152

153153
## Clean up
@@ -158,7 +158,7 @@ kubectl delete deployment,rs,pod --all
158158

159159
## Answers
160160

161-
For 3. Nop, same as the pod. A `deployment` only creates pods, it doesn't do anything else
161+
For 3), nop same as the pod. A `deployment` only creates pods, it doesn't do anything else.
162162

163163
## Links
164164

Diff for: 08-service/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ root@bash:/# apt update && apt install dnsutils curl
5252
You now have a shell inside a Kubernetes pod running in your cluster. Let this console open so you can type commands.
5353
Try to curl one of the pods created by the deployment above. How can you access the `deployment` **without** targeting a specific `pod`?
5454

55-
Ok, now let's create our first service (08-service/03-internal-service.yml):
55+
Ok, now let's create our first service [03-internal-service.yml](03-internal-service.yml):
5656

5757
```yml
5858
apiVersion: v1
@@ -197,10 +197,10 @@ You have seen a lot different `kind` of Kubernetes, let's take a step back and s
197197
## Exercises
198198

199199
1. Deploy an nginx and expose it internally
200-
1. Read [this](https://kubernetes.io/docs/concepts/services-networking/ingress/#simple-fanout) and modify the ingress to have:
200+
2. Read [this](https://kubernetes.io/docs/concepts/services-networking/ingress/#simple-fanout) and modify the ingress to have:
201201
* `/simple` that goes to the `simple-service`
202202
* `/nginx` that goes to your nginx deployment
203-
1. Change the `selector` in your `simple-service` look at what is happening
203+
3. Change the `selector` in your `simple-service` look at what is happening
204204

205205
## Clean up
206206

@@ -210,7 +210,7 @@ kubectl delete ingress,service,deployment,rs,pod --all
210210

211211
## Answers
212212

213-
For 2. You need to add the metadata `nginx.ingress.kubernetes.io/rewrite-target: /` to the ingress:
213+
For 2), you need to add the metadata `nginx.ingress.kubernetes.io/rewrite-target: /` to the ingress:
214214

215215
* Don't forget to create 2 deployments and 2 services.
216216
* 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"`

Diff for: 10-secrets/README.md

-4
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ spec:
7272

7373
Careful, if you change a secret after starting the pods, it won't update the pods. So you need to restart them.
7474

75-
## Exercices
76-
77-
Nothing to see here.
78-
7975
## Clean up
8076

8177
```sh

Diff for: 11-probes/README.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ This probe will wait 3 seconds before doing the first probing. The probing will
9696

9797
### Liveness probe impact
9898

99-
Look and apply the file [01-liveness-probe.yml](./01-liveness-probe.yml).
99+
Look and apply the file [01-liveness-probe.yml](01-liveness-probe.yml).
100100

101101
Run `kubectl get pods -w` and see what is happening.
102102

103103
The `liveness` of this pod fails (`exit 1`), so Kubernetes detects that the pod is not alive anymore and restarts it. So this probe is key for Kubernetes to know if a pod should be restarted or not.
104104

105105
### Readiness probe impact
106106

107-
Look and apply the file [02-readiness-probe.yml](./02-readiness-probe.yml).
107+
Look and apply the file [02-readiness-probe.yml](02-readiness-probe.yml).
108108

109109
Run `kubectl get pods -w` and see what is happening.
110110
Run `kubectl get deployments -w` and see what is happening.
@@ -128,10 +128,6 @@ Most of time having the readiness and liveness probe to be the same is enough. I
128128

129129
Another tip, your probes should not call dependent services of your application, to prevent cascading failure.
130130

131-
## Exercices
132-
133-
Nothing to see here.
134-
135131
## Clean up
136132

137133
```sh

Diff for: 12-resources/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ We will use other options, but ignore those. You can find more information on th
9898
### CPU
9999

100100
First let's try to declare a CPU `requests` that is too high compared to what your cluster has available.
101-
Review and apply the file [01-cpu-requests.yml](./01-cpu-requests.yml). Look at the pod created. What can you see?
101+
Review and apply the file [01-cpu-requests.yml](01-cpu-requests.yml). Look at the pod created. What can you see?
102102

103103
Second, let's try to have a pod consuming more CPU resources than allowed.
104-
Review and apply the file [02-cpu-limits.yml](./02-cpu-limits.yml). Look at the pod created. What can you see? Look at the logs of the pods:
104+
Review and apply the file [02-cpu-limits.yml](02-cpu-limits.yml). Look at the pod created. What can you see? Look at the logs of the pods:
105105

106106
```sh
107107
kubectl logs -f cpu-limits
@@ -116,10 +116,10 @@ kubectl top pod cpu-limits
116116
### RAM
117117

118118
First let's try to declare a memory `requests` that is too high compared to what your cluster has available.
119-
Review and apply the file [03-ram-requests.yml](./03-ram-requests.yml). Look at the pod created. What can you see?
119+
Review and apply the file [03-ram-requests.yml](03-ram-requests.yml). Look at the pod created. What can you see?
120120

121121
Second, let's try to have a pod consuming more RAM resources than allowed.
122-
Review and apply the file [04-ram-limits.yml](./04-ram-limits.yml). Look at the pod created. What can you see?
122+
Review and apply the file [04-ram-limits.yml](04-ram-limits.yml). Look at the pod created. What can you see?
123123

124124
## Clean up
125125

Diff for: 13-affinity-anti-affinity/README.md

-4
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,6 @@ Review and apply the manifests in [02-node-affinity.yml](02-node-affinity.yml).
139139

140140
Describe the pods what can you see? How do you explain it?
141141

142-
## Exercices
143-
144-
Nothing to see here.
145-
146142
## Clean up
147143

148144
```sh

Diff for: 14-pdb/README.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ A PDB is composed of two configurations:
3131

3232
If you want to see the effect of a PDB, you will need a multi-node Kubernetes. As those lines are written `minikube` is a single node cluster. To have locally a multi-node cluster you can install [kind](https://github.com/kubernetes-sigs/kind).
3333

34-
Use the [configuration file](./kind.yml) provided to create your cluster:
34+
Use the [configuration file](kind.yml) provided to create your cluster:
3535

3636
```sh
3737
kind create cluster --config kind.yml
3838
```
3939

40-
Review and apply the manifests in [01-pdb.yml](./01-pdb.yml). Why did we specify a soft anti-affinity?
40+
Review and apply the manifests in [01-pdb.yml](01-pdb.yml). Why did we specify a soft anti-affinity?
4141

4242
In a terminal run the command:
4343

@@ -57,10 +57,6 @@ This command will remove, drain, the node `kind-worker2` from the cluster. Watch
5757

5858
What do you see? How can you explain this?
5959

60-
## Exercices
61-
62-
Nothing to see here.
63-
6460
## Clean up
6561

6662
```sh

Diff for: 15-hpa-vpa/README.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ This image computes the square root of numbers:
4343
?>
4444
```
4545

46-
First, you need to active the [`metric-server`](https://github.com/kubernetes-incubator/metrics-server/) on minikube:
46+
First, you need to active the [metric-server](https://github.com/kubernetes-incubator/metrics-server/) on minikube:
4747

4848
```sh
4949
minikube addons enable metrics-server
5050
```
5151

52-
Review and apply the file [01-hpa.yml](./01-hpa.yml).
52+
Review and apply the file [01-hpa.yml](01-hpa.yml).
5353

5454
Now let's generate some load on our service:
5555

@@ -119,10 +119,6 @@ The second part is a regular deployment, that have undersized CPU `requests`.
119119

120120
After applying those manifest, look at the resources requests for the deployment.
121121

122-
## Exercices
123-
124-
Nothing to see here.
125-
126122
## Clean up
127123

128124
```sh

Diff for: 16-sidecar-containers/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Istio, the service mesh tool, installs a sidecar container to do its job: https:
3333

3434
## Exercices
3535

36-
Review and apply the file [01-sidecar.yml](./01-sidecar.yml). Connect to the `nginx` container and look at the file system in `/usr/share/nginx/html`.
36+
Review and apply the file [01-sidecar.yml](01-sidecar.yml). Connect to the `nginx` container and look at the file system in `/usr/share/nginx/html`.
3737

3838
This exercice is taken from the [official Kubernetes documentation](https://kubernetes.io/docs/tasks/access-application-cluster/communicate-containers-same-pod-shared-volume/#creating-a-pod-that-runs-two-containers).
3939

Diff for: 17-volumes/README.md

-4
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,6 @@ kubectl delete service,deployment --all
133133

134134
Recreate them, reconnect to mysql and see if you still have the database `testing` you created.
135135

136-
## Exercices
137-
138-
Nothing to see here.
139-
140136
## Clean up
141137

142138
```sh

Diff for: 18-stateful-set/README.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ spec:
4646
storage: 1Gi
4747
```
4848
49-
As you can see the manifest is very close to the one of a deployment. Apply the manigest [01-statefulset.yml](./01-statefulset.yml).
49+
As you can see the manifest is very close to the one of a deployment. Apply the manigest [01-statefulset.yml](01-statefulset.yml).
5050
5151
Look at the pods generated, see how they are generated. Connect to one of the pods:
5252
@@ -56,10 +56,6 @@ kubectl exec -ti web-0 /bin/bash
5656

5757
Write a file in the volume `www`. Terminate the same pod. See what happens. Reconnect to the pod, look at volume `www`. What can you see?
5858

59-
## Exercises
60-
61-
Nothing to see here.
62-
6359
## Clean up
6460

6561
```sh

Diff for: 98-other-topics/README.md

-4
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ It contains multiple, ready to use, Kubernetes manifest for projects, for exampl
4646

4747
[Kube State Metrics](https://github.com/kubernetes/kube-state-metrics) is a service you can install on your Kubernetes clusters to get metrics from its state. It's very useful for production cluster as you can measure and put alerts on the state of your applications. Like when do you have pod evictions, are your deployment fully deployed, etc.
4848

49-
## Exercises
50-
51-
Nothing to see here.
52-
5349
## Clean up
5450

5551
```sh

Diff for: README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ See the dedicated [README](99-good-practices).
266266

267267
## Links
268268

269-
* <http://kubernetesbyexample.com/>
270-
* <https://kubernetes.io/docs/home/>
271-
* <https://kubernetes.io/docs/reference/kubectl/cheatsheet/>
272-
* <https://hub.docker.com/r/mhausenblas/simpleservice/>
269+
* http://kubernetesbyexample.com/
270+
* https://kubernetes.io/docs/home/
271+
* https://kubernetes.io/docs/reference/kubectl/cheatsheet/
272+
* https://hub.docker.com/r/mhausenblas/simpleservice/

0 commit comments

Comments
 (0)