Bird
0
0

Given this YAML snippet for a MySQL operator: apiVersion: mysql.presslabs.org/v1alpha1 kind: MysqlCluster metadata: name: test-mysql spec: replicas: 2 What will be the number of MySQL pods created?

medium📝 Command Output Q4 of 15
Kubernetes - Operators and Custom Resources
Given this YAML snippet for a MySQL operator: apiVersion: mysql.presslabs.org/v1alpha1 kind: MysqlCluster metadata: name: test-mysql spec: replicas: 2 What will be the number of MySQL pods created?
A3 pods
B1 pod
C0 pods
D2 pods
Step-by-Step Solution
Solution:
  1. Step 1: Read replicas field in spec

    The replicas field is set to 2, indicating desired pod count.
  2. Step 2: Understand operator behavior

    The MySQL operator creates pods equal to replicas specified for the cluster.
  3. Final Answer:

    2 pods -> Option D
  4. Quick Check:

    Replicas = 2 pods created [OK]
Quick Trick: Replicas field controls pod count in operator spec [OK]
Common Mistakes:
  • Assuming default pod count is 1
  • Confusing replicas with instances
  • Ignoring replicas field

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes