Skip to content

Commit

Permalink
Add Argo and k8s questions
Browse files Browse the repository at this point in the history
Also updated Datadog questions.
  • Loading branch information
abregman committed Oct 25, 2022
1 parent cbdcfa3 commit c469c84
Show file tree
Hide file tree
Showing 12 changed files with 460 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

:bar_chart:  There are currently **2466** exercises and questions
:bar_chart:  There are currently **2487** exercises and questions

: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

Expand Down
73 changes: 71 additions & 2 deletions topics/argo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
- [ArgoCD 101](#argocd-101)
- [ArgoCD Secrets](#argocd-secrets)
- [ArgoCD Helm](#argocd-helm)
- [Argo Questions](#argo-questions)
- [Argo Rollouts](#argo-rollouts)
- [ArgoCD Questions](#argocd-questions)
- [ArgoCD 101](#argocd-101-1)
- [Practical ArgoCD 101](#practical-argocd-101)
- [CLI](#cli)
Expand All @@ -14,6 +15,9 @@
- [ArgoCD Application Health](#argocd-application-health)
- [ArgoCD Syncs](#argocd-syncs)
- [ArgoCD and Helm](#argocd-and-helm)
- [Argo Rollouts Questions](#argo-rollouts-questions)
- [Argo Rollouts 101](#argo-rollouts-101)
- [Argo Rollouts Commands](#argo-rollouts-commands)

## ArgoCD Exercises

Expand All @@ -37,7 +41,14 @@
|--------|--------|------|----|----|
| Helm ArgoCD App | Secrets | [Exercise](exercises/argocd_helm_app/exercise.md) | [Solution](exercises/argocd_helm_app/solution.md)

## Argo Questions
### Argo Rollouts

|Name|Topic|Objective & Instructions|Solution|Comments|
|--------|--------|------|----|----|
| Blue/Green Rollout | Rollouts | [Exercise](exercises/blue_green_rollout/exercise.md) | [Solution](exercises/blue_green_rollout/solution.md)
| Canary Rollout | Rollouts | [Exercise](exercises/canary_rollout/exercise.md) | [Solution](exercises/canary_rollout/solution.md)

## ArgoCD Questions

### ArgoCD 101

Expand Down Expand Up @@ -340,4 +351,62 @@ ArgoCD is able to track packaged Helm chart in a sense where it will monitor for
<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>

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.
</b></details>

## Argo Rollouts Questions

### Argo Rollouts 101

<details>
<summary>What is Argo Rollouts?</summary><br><b>

A controller for Kubernetes to perform application deployments using different strategies like Blue/Green deployments, Canary deployments, etc.

In addition, it supports A/B tests, automatic rollbacks and integrated metric analysis.
</b></details>

<details>
<summary>What happens when you rollout a new version of your app with argo rollouts?</summary><br><b>

- Argo Rollouts creates a new replicaset (that is the new app version)
- Old version is still alive
- ArgoCD marks the app as out-ofsync
</b></details>

### Argo Rollouts Commands

<details>
<summary>How to list rollouts?</summary><br><b>

`kubectl argo rollouts list rollouts`
</b></details>

<details>
<summary>How to list the rollouts of a given application?</summary><br><b>

`kubectl argo rollouts get rollout SOME-APP`
</b></details>

<details>
<summary>How to check the status of a rollout?</summary><br><b>

`kubectl argo rollouts status SOME-APP`
</b></details>

<details>
<summary>How to rollout a new version (with new container tag)?</summary><br><b>

`kubectl argo rollouts set image SOME-APP web-app=some/registry/and/image:v2.0`
</b></details>

<details>
<summary>How to manually promote to new app version?</summary><br><b>

`kubectl argo rollouts promote SOME-APP`
</b></details>

<details>
<summary>How do you monitor a rollout?</summary><br><b>

`kubectl argo rollouts get rollout SOME-APP --watch`
</b></details>
21 changes: 21 additions & 0 deletions topics/argo/exercises/blue_green_rollout/exercise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Argo Rollouts - Blue/Green

## Requirements

1. Running Kubernetes cluster
2. Argo Rollouts CLI
3. Deployed app in specific version

## Objectives

1. Install Argo Rollouts controller
2. Write a rollout manifest that use blue/green deployment and apply it
1. Set it to 3 replicas
2. Disable auto-promotions
3. Check the rollout list
4. Rollout a new version of your app in any way you prefer
1. Check the status of the rollout

## Solutions

Click [here](solution.md) to view the solution.
58 changes: 58 additions & 0 deletions topics/argo/exercises/blue_green_rollout/solution.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Argo Rollouts - Blue/Green

## Requirements

1. Running Kubernetes cluster
2. Argo Rollouts CLI
3. Deployed app in specific version

## Objectives

1. Install Argo Rollouts controller
2. Write a rollout manifest that use blue/green deployment and apply it
1. Set it to 3 replicas
2. Disable auto-promotions
3. Check the rollout list
4. Rollout a new version of your app in any way you prefer
1. Check the status of the rollout

## Solution

Installation:

1. `kubectl create namespace argo-rollouts`
1. `kubectl apply -n argo-rollouts -f https://github.com/argoproj/argo-rollouts/releases/latest/download/install.yaml`

2. Rollout resource:

```
---
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: some-app
spec:
replicas: 3
strategy:
blueGreen:
autoPromotionEnabled: false
selector:
matchLabels:
app: some-web-app
template:
metadata:
labels:
app: some-web-app
spec:
containers:
- name: web-app
image: some/registry/and/image:v1.0
ports:
- name: http
containerPort: 8080
protocol: TCP
```

3. `kubectl argo rollouts list rollouts`
4. `kubectl argo rollouts set image SOME-APP web-app=some/registry/and/image:v2.0`
1. `kubectl argo rollouts get rollout some-app --watch`
21 changes: 21 additions & 0 deletions topics/argo/exercises/canary_rollout/exercise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Argo Rollouts - Canary

## Requirements

1. Running Kubernetes cluster
2. Argo Rollouts CLI
3. Deployed app in a specific version

## Objectives

1. Install Argo Rollouts controller
2. Write a rollout manifest that use canary rollout strategy and apply it
1. Set it to 3 replicas
2. Disable auto-promotions
3. Check the rollout list
4. Rollout a new version of your app in any way you prefer
1. Check the status of the rollout

## Solutions

Click [here](solution.md) to view the solution.
70 changes: 70 additions & 0 deletions topics/argo/exercises/canary_rollout/solution.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Argo Rollouts - Canary

## Requirements

1. Running Kubernetes cluster
2. Argo Rollouts CLI
3. Deployed app in a specific version

## Objectives

1. Install Argo Rollouts controller
2. Write a rollout manifest that use canary rollout strategy and apply it
1. Set it to 6 replicas
2. Disable auto-promotions
3. Check the rollout list
4. Rollout a new version of your app in any way you prefer
1. Check the status of the rollout

## Solution

Installation:

1. `kubectl create namespace argo-rollouts`
1. `kubectl apply -n argo-rollouts -f https://github.com/argoproj/argo-rollouts/releases/latest/download/install.yaml`

2. Rollout resource:

```
---
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: some-app
spec:
replicas: 6
strategy:
canary:
stableService: k8s-service-stable
canaryService: k8s-service-canary
trafficRouting:
ambassador:
mappings:
- k8s-mapping
steps:
- setWeight: 30
- pause: {}
- setWeight: 60
- pause: {}
- setWeight: 100
- pause: {}
selector:
matchLabels:
app: some-web-app
template:
metadata:
labels:
app: some-web-app
spec:
containers:
- name: web-app
image: some/registry/and/image:v1.0
ports:
- name: http
containerPort: 8080
protocol: TCP
```

3. `kubectl argo rollouts list rollouts`
4. `kubectl argo rollouts set image SOME-APP web-app=some/registry/and/image:v2.0`
1. `kubectl argo rollouts get rollout some-app --watch`
33 changes: 32 additions & 1 deletion topics/datadog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
- [DataDog](#datadog)
- [Questions](#questions)
- [Basics](#basics)
- [Datadog Agent](#datadog-agent)
- [Datadog Integrations](#datadog-integrations)

## Questions

Expand Down Expand Up @@ -41,8 +43,37 @@ Basically any device or location that has Datadog agent installed and running on

<details>
<summary>What is a Datadog agent?</summary><br><b>

A software runs on a Datadog host. Its purpose is to collect data from the host and sent it to Datadog (data like metrics, logs, etc.)
</b></details>

<details>
<summary>What are Datadog agents?</summary><br><b>
<summary>What are Datadog tags?</summary><br><b>

Datadog tags are used to mark different information with unique properties. For example, you might want to tag some data with "environment: production" while tagging information from staging or dev environment with "environment: staging".
</b></details>

## Datadog Agent

<details>
<summary>What are the component of a Datadog agent?</summary><br><b>

* Collector: its role is to collect data from the host on which it's installed. The default period of time as of today is every 15 seconds.
* Forwarder: responsible for sending the data to Datadog over HTTPS
</b></details>

## Datadog Integrations


<details>
<summary>What can you tell about Datadog integrations?</summary><br><b>

- Datadog has many supported integrations with different services, platforms, etc.
- Each integration includes information on how to apply it, how to use it and what configuration options it supports
</b></details>

<details>
<summary>What opening some of the integrations windows/pages, there is a ection called "Monitors". What can be found there?</summary><br><b>

Usually you can find there some anomaly types that Datadog suggests to monitor and track.
</b></details>
Loading

0 comments on commit c469c84

Please sign in to comment.