0
0
Kubernetesdevops~10 mins

ReplicaSet definition in Kubernetes - Interactive Code Practice

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

Complete the code to specify the kind of Kubernetes object.

Kubernetes
apiVersion: apps/v1
kind: [1]
metadata:
  name: my-replicaset
Drag options to blanks, or click blank then click option'
APod
BDeployment
CReplicaSet
DService
Attempts:
3 left
💡 Hint
Common Mistakes
Using Deployment instead of ReplicaSet
Using Pod or Service as kind
2fill in blank
medium

Complete the code to set the number of pod replicas.

Kubernetes
spec:
  replicas: [1]
Drag options to blanks, or click blank then click option'
A0
B-1
Cabc
D3
Attempts:
3 left
💡 Hint
Common Mistakes
Setting replicas to zero or negative numbers
Using non-numeric values
3fill in blank
hard

Fix the error in the selector field to match the pod labels.

Kubernetes
spec:
  selector:
    matchLabels:
      app: [1]
Drag options to blanks, or click blank then click option'
Afrontend
Bbackend
Cdatabase
Dcache
Attempts:
3 left
💡 Hint
Common Mistakes
Using a label that does not match pod labels
Typos in label values
4fill in blank
hard

Fill both blanks to complete the pod template metadata and container name.

Kubernetes
spec:
  template:
    metadata:
      labels:
        app: [1]
    spec:
      containers:
      - name: [2]
        image: nginx:latest
Drag options to blanks, or click blank then click option'
Afrontend
Bbackend
Cnginx
Dredis
Attempts:
3 left
💡 Hint
Common Mistakes
Mismatch between labels and selector
Using container names that don't match the image
5fill in blank
hard

Fill all three blanks to complete the ReplicaSet spec with replicas, selector, and pod labels.

Kubernetes
spec:
  replicas: [1]
  selector:
    matchLabels:
      app: [2]
  template:
    metadata:
      labels:
        app: [3]
Drag options to blanks, or click blank then click option'
Afrontend
B3
Dbackend
Attempts:
3 left
💡 Hint
Common Mistakes
Mismatch between selector and pod labels
Using non-numeric replicas