Skip to content

Commit cbdcfa3

Browse files
author
abregman
committed
Add Datadog and ArgoCD questions
As well as exercises.
1 parent 7cceb86 commit cbdcfa3

File tree

15 files changed

+671
-23
lines changed

15 files changed

+671
-23
lines changed

README.md

+28-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
:information_source:  This repo contains questions and exercises on various technical topics, sometimes related to DevOps and SRE
44

5-
:bar_chart:  There are currently **2415** exercises and questions
6-
7-
:books:  To learn more about DevOps and SRE, check the resources in [devops-resources](https://github.com/bregman-arie/devops-resources) repository
5+
:bar_chart:  There are currently **2466** exercises and questions
86

97
:warning:  You can use these for preparing for an interview but most of the questions and exercises don't represent an actual interview. Please read [FAQ page](faq.md) for more details
108

@@ -799,6 +797,33 @@ Logging<br>
799797
<summary>What is the difference between infrastructure monitoring and application monitoring? (methods, tools, ...)</summary><br><b>
800798
</b></details>
801799

800+
### Application Performance Management
801+
802+
<details>
803+
<summary>What is Application Performance Management?</summary><br><b>
804+
805+
- IT metrics translated into business insights
806+
- Practices for monitoring applications insights so we can improve performances, reduce issues and improve overall user experience
807+
</b></details>
808+
809+
<details>
810+
<summary>Name three aspects of a project you can monitor with APM (e.g. backend)</summary><br><b>
811+
812+
- Frontend
813+
- Backend
814+
- Infra
815+
- ...
816+
</b></details>
817+
818+
<details>
819+
<summary>What can be collected/monitored to perform APM monitoring?</summary><br><b>
820+
821+
- Metrics
822+
- Logs
823+
- Events
824+
Traces
825+
</b></details>
826+
802827
## Prometheus
803828

804829
<details>

faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ I don't have a definitive answer for this question, I'm exploring it myself from
3434

3535
1. Search for them using search engines, documentation pages, ... this is part of being a DevOps engineer
3636
2. Use the communities: many people will be happy to help and answer your questions
37-
3. Ask us. If you want, you can contact me or even open an issue that is only a question, that's totally fine :)
37+
3. Ask us. If you want, you can contact me or start a discussion on this project.
3838

3939
### Where the questions and answers are coming from?
4040

topics/argo/README.md

+172-8
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,40 @@
22

33
- [Argo](#argo)
44
- [ArgoCD Exercises](#argocd-exercises)
5-
- [Argo Questions](#argo-questions)
65
- [ArgoCD 101](#argocd-101)
6+
- [ArgoCD Secrets](#argocd-secrets)
7+
- [ArgoCD Helm](#argocd-helm)
8+
- [Argo Questions](#argo-questions)
9+
- [ArgoCD 101](#argocd-101-1)
710
- [Practical ArgoCD 101](#practical-argocd-101)
11+
- [CLI](#cli)
12+
- [ArgoCD Configuration](#argocd-configuration)
813
- [Multi-Cluster Environment](#multi-cluster-environment)
9-
- [Access Control](#access-control)
14+
- [ArgoCD Application Health](#argocd-application-health)
15+
- [ArgoCD Syncs](#argocd-syncs)
16+
- [ArgoCD and Helm](#argocd-and-helm)
1017

1118
## ArgoCD Exercises
1219

13-
TODO
20+
### ArgoCD 101
21+
22+
|Name|Topic|Objective & Instructions|Solution|Comments|
23+
|--------|--------|------|----|----|
24+
| Creating an App | App | [Exercise](exercises/app_creation/exercise.md) | [Solution](exercises/app_creation/solution.md)
25+
| Syncing App - Git | Sync | [Exercise](exercises/sync_app_git/exercise.md) | [Solution](exercises/sync_app_git/solution.md)
26+
| Syncing App - Cluster | Sync | [Exercise](exercises/sync_app_cluster/exercise.md) | [Solution](exercises/sync_app_cluster/solution.md)
27+
28+
### ArgoCD Secrets
29+
30+
|Name|Topic|Objective & Instructions|Solution|Comments|
31+
|--------|--------|------|----|----|
32+
| Secrets 101 | Secrets | [Exercise](exercises/secrets_101/exercise.md) | [Solution](exercises/secrets_101/solution.md)
33+
34+
### ArgoCD Helm
35+
36+
|Name|Topic|Objective & Instructions|Solution|Comments|
37+
|--------|--------|------|----|----|
38+
| Helm ArgoCD App | Secrets | [Exercise](exercises/argocd_helm_app/exercise.md) | [Solution](exercises/argocd_helm_app/solution.md)
1439

1540
## Argo Questions
1641

@@ -53,11 +78,10 @@ With ArgoCD it's really easy to roll back to a previous version because all the
5378
4. Push to image to a registry
5479
5. Update K8S manifest file(s) in a separate app config repository
5580
6. ArgoCD tracks changes in the app config repository. Since there was a change in the repository, it will apply the changes from the repo
56-
7.
5781
</b></details>
5882

5983
<details>
60-
<summary>True or False? ArgoCD support Kubernetes YAML files but not other manifests formats like Helm Charts and Kustomize</summary><br><b>
84+
<summary>True or False? ArgoCD supports Kubernetes YAML files but not other manifests formats like Helm Charts and Kustomize</summary><br><b>
6185

6286
False. It supports Kubernetes YAML files as well as Helm Charts and Kustomize.
6387

@@ -113,6 +137,13 @@ Ella is right, ArgoCD is an extension of the cluster, that is very different fro
113137
"Application"
114138
</b></details>
115139

140+
<details>
141+
<summary>How ArgoCD makes access management in the cluster easier?</summary><br><b>
142+
143+
Instead of creating Kubernetes resources, you can use Git to manage who is allowed to push code, to review it, merge it, etc - either human users or 3rd party systems and services. There is no need to use ClusterRole or User resources in Kubernetes hence the management of access is much more simplified.
144+
145+
</b></details>
146+
116147
### Practical ArgoCD 101
117148

118149
<details>
@@ -148,6 +179,77 @@ This section defines with which Kubernetes cluster the app in the tracked Git re
148179
AddProject
149180
</b></details>
150181
182+
<details>
183+
<summary>True or False? ArgoCD sync period is 3 hours</summary><br><b>
184+
185+
False. ArgoCD sync period is 3 minutes as of today (and not hours).
186+
</b></details>
187+
188+
<details>
189+
<summary>Describe shortly what ArgoCD does every sync period</summary><br><b>
190+
191+
1. Gathers list of all the apps to sync (those that are marked with "auto-sync")
192+
2. Gets Git state for each repository
193+
3. Performs comparison between the repository Git state and the Kubernetes cluster state
194+
1. If states are different, the application marked as "out-of-sync" and further action might be taken (based on the configuration)
195+
2. If states are equal, the application marked as "synced"
196+
</b></details>
197+
198+
#### CLI
199+
200+
<details>
201+
<summary>Create a new application with the following properties:
202+
203+
* app name: some-app
204+
* repo: https://fake.repo.address
205+
* app path: ./app_path
206+
* namespace: default
207+
* cluster: my.kubernetes.cluster
208+
</summary><br><b>
209+
210+
```
211+
argocd app create some-app \
212+
--project \
213+
--repo https://fake.repo.address \
214+
--path ./app_path \
215+
--dest-namespace default \
216+
--dest-server my.kubernetes.cluster
217+
```
218+
219+
</b></details>
220+
221+
<details>
222+
<summary>List all argocd apps</summary><br><b>
223+
224+
`argocd app list`
225+
</b></details>
226+
227+
<details>
228+
<summary>Print detailed information on the app called "some-app"</summary><br><b>
229+
230+
`argocd app get some-app`
231+
</b></details>
232+
233+
### ArgoCD Configuration
234+
235+
<details>
236+
<summary>Is it possible to change default sync period of ArgoCD?</summary><br><b>
237+
238+
Yes, it is possible by adding the following to the argocd-cm (ConfigMap):
239+
240+
```
241+
data:
242+
timeout.reconciliation: 300s
243+
```
244+
245+
The value can be any number of seconds you would like to set.
246+
</b></details>
247+
248+
<details>
249+
<summary>What will be the result of setting <code>timeout.reconciliation: 0s</code>?</summary><br><b>
250+
251+
sync functionality will be disabled.
252+
</b></details>
151253

152254
### Multi-Cluster Environment
153255

@@ -169,11 +271,73 @@ There are multiple ways to deal with it:
169271
2. Use overlays and Kustomize to control the context of where your changes synced based on the CI process/pipeline used.
170272
</b></details>
171273

172-
### Access Control
274+
### ArgoCD Application Health
173275

174276
<details>
175-
<summary>How ArgoCD makes access management in the cluster easier?</summary><br><b>
277+
<summary>What are some possible health statuses for an ArgoCD application?</summary><br><b>
278+
279+
* Healthy
280+
* Missing: resource doesn't exist in the cluser
281+
* Suspended: resource is paused
282+
* Progressing: resources isn't healthy but will become healthy or has the chance to become healthy
283+
* Degraded: resource isn't healthy
284+
* Unknown: it's not known what's the app health
285+
</b></details>
176286

177-
Instead of creating Kubernetes resources, you can use Git to manage who is allowed to push code, to review it, merge it, etc - either human users or 3rd party systems and services. There is no need to use ClusterRole or User resources in Kubernetes hence the management of access is much more simplified.
287+
<details>
288+
<summary>True or False? A Deployment considered to be healthy if the Pods are running</summary><br><b>
289+
290+
Not exactly. A Deployment (as well as StatefulSet, ReplicaSet and DaemonSet) considered healthy if the desired state equals to actual/current state (this includes the number of replicas).
291+
</b></details>
292+
293+
<details>
294+
<summary>True or False? An ingress is considered healthy if status.loadBalancer.ingress list includes at least one value</summary><br><b>
295+
296+
True.
297+
</b></details>
298+
299+
<details>
300+
<summary>What can you tell about the health of custom Kubernetes resources?</summary><br><b>
301+
302+
The health of custom Kubernetes resources is defined by writing Lua scripts.
303+
304+
You find such list of scripts here: https://github.com/argoproj/argo-cd/tree/master/resource_customizations
305+
</b></details>
306+
307+
### ArgoCD Syncs
308+
309+
<details>
310+
<summary>Explain manual syncs vs. automatic syncs</summary><br><b>
311+
312+
Automatic syncs means that once ArgoCD detected a change or a new version of your app in Git, it will apply the changes so the current/actual state can be equal to desired state.
313+
314+
With manual syncs, ArgoCD will identify there is a difference, but will do nothing to correct it.
315+
</b></details>
316+
317+
<details>
318+
<summary>Explain auto-pruning</summary><br><b>
319+
320+
If enabled, auto-pruning will remove resources when files or content is removed from a tracked Git repository.
321+
322+
If disabled, ArgoCD will not remove anything, even when content or files are removed.
323+
</b></details>
324+
325+
<details>
326+
<summary>Explain self-heal in regards to ArgoCD</summary><br><b>
178327

328+
Self-heal is the process of correcting the cluster state based on the desired state, when someone makes manual changes to the cluster.
179329
</b></details>
330+
331+
### ArgoCD and Helm
332+
333+
<details>
334+
<summary>What support is provided in ArgoCD for Helm?</summary><br><b>
335+
336+
ArgoCD is able to track packaged Helm chart in a sense where it will monitor for new versions.
337+
</b></details>
338+
339+
<details>
340+
<summary>True or False? When ArgoCD tracks Helm chart the chart is no longer an Helm application and it's a ArgoCD app</summary><br><b>
341+
342+
True. Trying to execute commands like `helm ls` will fail because helm metadata doesn't exist anymore and the application is tracked as ArgoCD app.
343+
</b></details>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# App Creation
2+
3+
## Requirements
4+
5+
1. Make sure you have repository with some Kubernetes manifests
6+
2. Make sure you have a Kubernetes cluster running with ArgoCD installed
7+
8+
## Objectives
9+
10+
1. Using the CLI or the UI, create a a new application with the following properties:
11+
1. app name: app-demo
12+
2. project: app-project
13+
3. repository URL: your repo with some k8s manifests
14+
4. namespace: default
15+
2. Verify the app was created
16+
3. Sync the app
17+
4. Verify Kubernetes resources were created
18+
5. Delete the app
19+
20+
## Solution
21+
22+
Click [here](solution.md) to view the solution
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# App Creation
2+
3+
## Requirements
4+
5+
1. Make sure you have repository with some Kubernetes manifests
6+
2. Make sure you have a Kubernetes cluster running with ArgoCD installed
7+
8+
## Objectives
9+
10+
1. Using the CLI or the UI, create a a new application with the following properties:
11+
1. app name: app-demo
12+
2. project: app-project
13+
3. repository URL: your repo with some k8s manifests
14+
4. namespace: default
15+
2. Verify the app was created
16+
3. Sync the app
17+
4. Verify Kubernetes resources were created
18+
5. Delete the app
19+
20+
## Solution
21+
22+
### UI
23+
24+
1. Click on "New App"
25+
1. Insert application name: `app-demo`
26+
2. Insert project: `app-project`
27+
3. Under source put the repository URL to your GitHub repo with Kubernetes manifests
28+
1. Set the path for your application
29+
4. Under destination put the address of your Kubernetes cluster and set namespace to `default`
30+
5. Click on "Create"
31+
2. Click on "Sync" button on the "app-demo" form
32+
1. Click on "Synchronize"
33+
3. Verify the Kubernetes resources were created
34+
1. `kubectl get deployments`
35+
4. Delete the app
36+
37+
### CLI
38+
39+
```
40+
argocd app create app-demo \
41+
--project app-project \
42+
--repo https://fake.repo.address \
43+
--path ./some_app_path \
44+
--dest-namespace default \
45+
--dest-server my.kubernetes.cluster
46+
47+
# Check app state
48+
argocd app list
49+
argocd app get app-demo
50+
51+
# Sync app state
52+
argocd app sync app-demo
53+
argocd app wait app-demo
54+
55+
# Verify kubernetes resources were created
56+
kubectl get deployments
57+
58+
# Delete the app
59+
argocd app delete app-demo
60+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# ArgoCD Helm App
2+
3+
## Requirements
4+
5+
1. Running Kubernetes cluster
6+
2. ArgoCD installed on the k8s cluster
7+
3. Repository of an Helm chart
8+
9+
## Objectives
10+
11+
1. Create a new app in ArgoCD that points to the repo of your Helm chart
12+
13+
## Solution
14+
15+
Click [here](solution.md) to view the solution

0 commit comments

Comments
 (0)