CAPA Sample Practice Questions¶
Practice Resources¶
Argo CD (40%)¶
Question 1¶
Create an Argo CD Application that deploys from a Git repository.
Show Solution
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-app
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/org/repo.git
targetRevision: HEAD
path: manifests
destination:
server: https://kubernetes.default.svc
namespace: default
syncPolicy:
automated:
prune: true
selfHeal: true
Question 2¶
How do you sync an application manually using the CLI?
Show Solution
Question 3¶
Configure an Application to use a Helm chart with custom values.
Show Solution
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: helm-app
namespace: argocd
spec:
project: default
source:
repoURL: https://charts.example.com
chart: my-chart
targetRevision: 1.0.0
helm:
values: |
replicaCount: 3
image:
tag: latest
parameters:
- name: service.type
value: LoadBalancer
destination:
server: https://kubernetes.default.svc
namespace: default
Question 4¶
What are the different sync statuses in Argo CD?
Show Solution
**Sync Status:** - **Synced** - Live state matches desired state - **OutOfSync** - Live state differs from desired state - **Unknown** - Unable to determine sync status **Health Status:** - **Healthy** - Resource is healthy - **Progressing** - Resource is not healthy but could become healthy - **Degraded** - Resource is degraded - **Suspended** - Resource is suspended - **Missing** - Resource does not exist - **Unknown** - Health status unknownArgo Workflows (25%)¶
Question 5¶
Create a simple Argo Workflow with two sequential steps.
Show Solution
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: hello-world-
spec:
entrypoint: main
templates:
- name: main
steps:
- - name: step1
template: hello
- - name: step2
template: world
- name: hello
container:
image: alpine
command: [echo, "Hello"]
- name: world
container:
image: alpine
command: [echo, "World"]
Question 6¶
Create a DAG workflow with parallel tasks.
Show Solution
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: dag-workflow-
spec:
entrypoint: main
templates:
- name: main
dag:
tasks:
- name: A
template: task
- name: B
template: task
dependencies: [A]
- name: C
template: task
dependencies: [A]
- name: D
template: task
dependencies: [B, C]
- name: task
container:
image: alpine
command: [echo, "Running task"]
Question 7¶
Pass parameters between workflow steps.
Show Solution
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: param-workflow-
spec:
entrypoint: main
templates:
- name: main
steps:
- - name: generate
template: gen-output
- - name: consume
template: use-output
arguments:
parameters:
- name: message
value: "{{steps.generate.outputs.parameters.result}}"
- name: gen-output
container:
image: alpine
command: [sh, -c, "echo 'Hello' > /tmp/result.txt"]
outputs:
parameters:
- name: result
valueFrom:
path: /tmp/result.txt
- name: use-output
inputs:
parameters:
- name: message
container:
image: alpine
command: [echo, "{{inputs.parameters.message}}"]
Argo Rollouts (20%)¶
Question 8¶
Create a Canary rollout that shifts 20% traffic initially.
Show Solution
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: canary-rollout
spec:
replicas: 5
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: app
image: my-app:v2
strategy:
canary:
steps:
- setWeight: 20
- pause: {duration: 1m}
- setWeight: 50
- pause: {duration: 1m}
- setWeight: 80
- pause: {duration: 1m}
Question 9¶
Create a Blue-Green rollout.
Show Solution
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: bluegreen-rollout
spec:
replicas: 3
selector:
matchLabels:
app: my-app
template:
metadata:
labels:
app: my-app
spec:
containers:
- name: app
image: my-app:v2
strategy:
blueGreen:
activeService: my-app-active
previewService: my-app-preview
autoPromotionEnabled: false
Question 10¶
Promote or abort a rollout using kubectl.
Show Solution
Argo Events (15%)¶
Question 11¶
Create an EventSource for GitHub webhooks.
Show Solution
Question 12¶
Create a Sensor that triggers a workflow on events.
Show Solution
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
name: github-sensor
spec:
dependencies:
- name: github-dep
eventSourceName: github-eventsource
eventName: example
triggers:
- template:
name: workflow-trigger
k8s:
operation: create
source:
resource:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: github-workflow-
spec:
entrypoint: main
templates:
- name: main
container:
image: alpine
command: [echo, "Triggered by GitHub"]
Exam Tips¶
- Know Argo CD Application spec - source, destination, syncPolicy
- Understand sync strategies - automated vs manual, prune, selfHeal
- Practice Workflow templates - steps, DAG, parameters, artifacts
- Know Rollout strategies - canary steps, blue-green services
- Understand event-driven architecture - EventSource, Sensor, Trigger