Skip to content

Commit e1379fb

Browse files
author
abregman
committed
Add system design notebook image
As well as two Kubernetes basic exercises.
1 parent e54648d commit e1379fb

File tree

6 files changed

+56
-5
lines changed

6 files changed

+56
-5
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<td align="center"><a href="#mongo"><img src="images/mongo.png" width="75px;" height="75px;" alt="Mongo"/><br /><b>Mongo</b></a></td>
7474
<td align="center"><a href="#puppet"><img src="images/puppet.png" width="75px;" height="75px;" alt="puppet"/><br /><b>Puppet</b></a></td>
7575
<td align="center"><a href="#distributed"><img src="images/distributed.png" width="110px;" height="75px;" alt="Distributed"/><br /><b>Distributed</b></a></td>
76-
<td align="center"><a href="#questions-you-ask"><img src="images/you.png" width="110px;" height="75px;" alt="you"/><br /><b>Questions you can ask</b></a></td>
76+
<td align="center"><a href="#questions-you-ask"><img src="images/you.png" width="90px;" height="75px;" alt="you"/><br /><b>Questions you can ask</b></a></td>
7777
</tr>
7878
</table>
7979
</center>
@@ -5220,7 +5220,9 @@ Because each container has its own writable container layer, and all changes are
52205220

52215221
|Name|Topic|Objective & Instructions|Solution|Comments|
52225222
|--------|--------|------|----|----|
5223-
|My First Pod|Dockerfile|WIP|WIP
5223+
| My First Pod | Pods | [Exercise](exercises/kubernetes/pods_01.md) | [Solution](exercises/kubernetes/solutions/pods_01_solution.md)
5224+
| Creating a service | Service | [Exercise](exercises/kubernetes/services_01.md) | [Solution](exercises/kubernetes/solutions/services_01_solution.md)
5225+
52245226

52255227
### Kubernetes Self Assesment
52265228

@@ -6342,13 +6344,15 @@ View more [here](https://www.youtube.com/watch?v=rDCWxkvPlAw)
63426344
<details>
63436345
<summary>What is Helm?</summary><br><b>
63446346
6345-
Package manager for Kubernetes. Basically the ability to package YAML files and distribute them to other users.
6347+
Package manager for Kubernetes. Basically the ability to package YAML files and distribute them to other users and apply them in different clusters.
63466348
</b></details>
63476349
63486350
<details>
63496351
<summary>Why do we need Helm? What would be the use case for using it?</summary><br><b>
63506352
6351-
Sometimes when you would like to deploy a certain application to your cluster, you need to create multiple YAML files / Components like: Secret, Service, ConfigMap, etc. This can be tedious task. So it would make sense to ease the process by introducing something that will allow us to share these bundle of YAMLs every time we would like to add an application to our cluster. This something is called Helm.
6353+
Sometimes when you would like to deploy a certain application to your cluster, you need to create multiple YAML files/components like: Secret, Service, ConfigMap, etc. This can be tedious task. So it would make sense to ease the process by introducing something that will allow us to share these bundle of YAMLs every time we would like to add an application to our cluster. This something is called Helm.
6354+
6355+
A common scenario is having multiple Kubernetes clusters (prod, dev, staging). Instead of individually applying different YAMLs in each cluster, it makes more sense to create one Chart and install it in every cluster.
63526356
</b></details>
63536357
63546358
<details>
@@ -11724,7 +11728,7 @@ Bonus: extract the last word of each line
1172411728
<summary>Replace 'red' with 'green'</summary><br><b>
1172511729
</b></details>
1172611730

11727-
#### System Design
11731+
## System Design
1172811732

1172911733
<details>
1173011734
<summary>Explain what is a "Single point of failure" and give an example</summary><br><b>

exercises/kubernetes/pods_01.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Pods 01
2+
3+
#### Objective
4+
5+
Learn how to create pods
6+
7+
#### Instructions
8+
9+
1. Choose a container image (e.g. redis, nginx, mongo, etc.)
10+
2. Create a pod (in the default namespace) using the image you chose
11+
3. Verify the pod is running

exercises/kubernetes/services_01.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Services 01
2+
3+
#### Objective
4+
5+
Learn how to create services
6+
7+
#### Instructions
8+
9+
1. Create a pod running ngnix
10+
2. Create a service for the pod you've just created
11+
3. Verify the app is reachable
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## Pods 01 - Solution
2+
3+
```
4+
kubectl run nginx --image=nginx --restart=Never
5+
kubectl get pods
6+
```
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Services 01 - Solution
2+
3+
```
4+
kubectl run nginx --image=nginx --restart=Never --port=80 --labels="app=dev-nginx"
5+
6+
cat << EOF > nginx-service.yaml
7+
apiVersion: v1
8+
kind: Service
9+
metadata:
10+
name: nginx-service
11+
spec:
12+
selector:
13+
app: dev-nginx
14+
ports:
15+
- protocol: TCP
16+
port: 80
17+
targetPort: 9372
18+
EOF
19+
```

images/system_design_notebook.png

15.6 KB
Loading

0 commit comments

Comments
 (0)