0
0
Kubernetesdevops~10 mins

Why ReplicaSets ensure availability in Kubernetes - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the number of pod replicas in a ReplicaSet.

Kubernetes
replicas: [1]
Drag options to blanks, or click blank then click option'
A5
B3
C1
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Setting replicas to 0 stops all pods.
Using a string instead of a number.
2fill in blank
medium

Complete the selector to match pods with label app: nginx.

Kubernetes
selector:
  matchLabels:
    app: [1]
Drag options to blanks, or click blank then click option'
Amysql
Bredis
Cnginx
Dapache
Attempts:
3 left
💡 Hint
Common Mistakes
Using a label that does not match any pod.
Typos in label values.
3fill in blank
hard

Fix the error in the pod template labels to ensure they match the selector.

Kubernetes
template:
  metadata:
    labels:
      app: [1]
Drag options to blanks, or click blank then click option'
Amysql
Bapache
Credis
Dnginx
Attempts:
3 left
💡 Hint
Common Mistakes
Mismatch between selector and template labels.
Using different app names.
4fill in blank
hard

Fill both blanks to complete the ReplicaSet spec that ensures 4 nginx pods.

Kubernetes
replicas: [1]
selector:
  matchLabels:
    app: [2]
Drag options to blanks, or click blank then click option'
A4
B3
Cnginx
Dapache
Attempts:
3 left
💡 Hint
Common Mistakes
Wrong number of replicas.
Selector label mismatch.
5fill in blank
hard

Fill all three blanks to complete the pod template spec inside the ReplicaSet.

Kubernetes
template:
  metadata:
    labels:
      app: [1]
  spec:
    containers:
    - name: [2]
      image: [3]
Drag options to blanks, or click blank then click option'
Anginx
Bweb-server
Cnginx:latest
Dapache
Attempts:
3 left
💡 Hint
Common Mistakes
Mismatch between labels and container image.
Using wrong container names.