diff --git a/README.md b/README.md index 9dc416c..e5e8e9b 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ Mongo
Mongo
puppet
Puppet
Distributed
Distributed
- you
Questions you can ask
+ you
Questions you can ask
@@ -5220,7 +5220,9 @@ Because each container has its own writable container layer, and all changes are |Name|Topic|Objective & Instructions|Solution|Comments| |--------|--------|------|----|----| -|My First Pod|Dockerfile|WIP|WIP +| My First Pod | Pods | [Exercise](exercises/kubernetes/pods_01.md) | [Solution](exercises/kubernetes/solutions/pods_01_solution.md) +| Creating a service | Service | [Exercise](exercises/kubernetes/services_01.md) | [Solution](exercises/kubernetes/solutions/services_01_solution.md) + ### Kubernetes Self Assesment @@ -6342,13 +6344,15 @@ View more [here](https://www.youtube.com/watch?v=rDCWxkvPlAw)
What is Helm?
-Package manager for Kubernetes. Basically the ability to package YAML files and distribute them to other users. +Package manager for Kubernetes. Basically the ability to package YAML files and distribute them to other users and apply them in different clusters.
Why do we need Helm? What would be the use case for using it?
-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. +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. + +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.
@@ -11724,7 +11728,7 @@ Bonus: extract the last word of each line Replace 'red' with 'green'
-#### System Design +## System Design
Explain what is a "Single point of failure" and give an example
diff --git a/exercises/kubernetes/pods_01.md b/exercises/kubernetes/pods_01.md new file mode 100644 index 0000000..16322c3 --- /dev/null +++ b/exercises/kubernetes/pods_01.md @@ -0,0 +1,11 @@ +## Pods 01 + +#### Objective + +Learn how to create pods + +#### Instructions + +1. Choose a container image (e.g. redis, nginx, mongo, etc.) +2. Create a pod (in the default namespace) using the image you chose +3. Verify the pod is running diff --git a/exercises/kubernetes/services_01.md b/exercises/kubernetes/services_01.md new file mode 100644 index 0000000..f5715d8 --- /dev/null +++ b/exercises/kubernetes/services_01.md @@ -0,0 +1,11 @@ +## Services 01 + +#### Objective + +Learn how to create services + +#### Instructions + +1. Create a pod running ngnix +2. Create a service for the pod you've just created +3. Verify the app is reachable diff --git a/exercises/kubernetes/solutions/pods_01_solution.md b/exercises/kubernetes/solutions/pods_01_solution.md new file mode 100644 index 0000000..bea89ac --- /dev/null +++ b/exercises/kubernetes/solutions/pods_01_solution.md @@ -0,0 +1,6 @@ +## Pods 01 - Solution + +``` +kubectl run nginx --image=nginx --restart=Never +kubectl get pods +``` diff --git a/exercises/kubernetes/solutions/services_01_solution.md b/exercises/kubernetes/solutions/services_01_solution.md new file mode 100644 index 0000000..da60267 --- /dev/null +++ b/exercises/kubernetes/solutions/services_01_solution.md @@ -0,0 +1,19 @@ +## Services 01 - Solution + +``` +kubectl run nginx --image=nginx --restart=Never --port=80 --labels="app=dev-nginx" + +cat << EOF > nginx-service.yaml +apiVersion: v1 +kind: Service +metadata: + name: nginx-service +spec: + selector: + app: dev-nginx + ports: + - protocol: TCP + port: 80 + targetPort: 9372 +EOF +``` diff --git a/images/system_design_notebook.png b/images/system_design_notebook.png new file mode 100644 index 0000000..87056e1 Binary files /dev/null and b/images/system_design_notebook.png differ