0
0
Microservicessystem_design~10 mins

Why Kubernetes manages microservice deployment in Microservices - Test Your Understanding

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

Complete the code to create a Kubernetes deployment for a microservice.

Microservices
kubectl create deployment [1] --image=myapp:latest
Drag options to blanks, or click blank then click option'
Amy-microservice
Bservice
Cpod
Dcontainer
Attempts:
3 left
💡 Hint
Common Mistakes
Using generic terms like 'service' or 'pod' instead of a unique deployment name.
2fill in blank
medium

Complete the command to expose the microservice deployment as a service.

Microservices
kubectl expose deployment my-microservice --type=[1] --port=80
Drag options to blanks, or click blank then click option'
AClusterIP
BLoadBalancer
CNodePort
DExternalName
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing ClusterIP which is internal only.
3fill in blank
hard

Fix the error in the YAML snippet to define a container image for the microservice.

Microservices
containers:
  - name: my-microservice
    image: [1]
Drag options to blanks, or click blank then click option'
Amyapp:latest
Bmyapp_latest
Cmyapp/latest
Dmyapp-latest
Attempts:
3 left
💡 Hint
Common Mistakes
Using slashes or underscores instead of colon in image tag.
4fill in blank
hard

Fill both blanks to complete the YAML for a Kubernetes service selector.

Microservices
selector:
  app: [1]
  tier: [2]
Drag options to blanks, or click blank then click option'
Afrontend
Bbackend
Cmy-microservice
Ddatabase
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up app and tier labels or using unrelated labels.
5fill in blank
hard

Fill all three blanks to complete the command for scaling the deployment.

Microservices
kubectl scale deployment [1] --replicas=[2] --namespace=[3]
Drag options to blanks, or click blank then click option'
Amy-microservice
B5
Cproduction
Ddefault
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong deployment name, replica count, or namespace.