DevOps- test  - K8s - Part 1

DevOps- test - K8s - Part 1

Assessment

Quiz

•

Other

•

Professional Development

•

Practice Problem

•

Hard

Created by

Intern undefined

Used 3+ times

FREE Resource

Student preview

quiz-placeholder

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt


  1. Which field in a Pod YAML definition specifies the container image to use?

spec.containers.image

metadata.image

spec.image

containers.image

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which command is used to create a Pod from a YAML file?

kubectl create -f pod.yaml

kubectl run pod.yaml

kubectl apply -f pod.yaml

kubectl start pod.yaml

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen if a field is incorrectly specified in a YAML file while creating a Pod?

The Pod will be created with default values

Kubernetes will ignore the incorrect field

Kubernetes will throw a validation error

The Pod will be created but in a CrashLoopBackOff state

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which command would you use to add a label to an existing Pod?

kubectl label pod mypod app=frontend

kubectl annotate pod mypod app=frontend

kubectl apply label pod mypod app=frontend

kubectl set label pod mypod app=frontend

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a key characteristic of Kubernetes labels?

They must be unique across the entire cluster

They can be used to select a group of objects

They are automatically applied by Kubernetes

They are used for storing secrets

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. How do you define the number of replicas in a Deployment YAML file?

spec.template.spec.replicas

  • spec.replicas

metadata.replicas

spec.template.replicas

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which command scales a Deployment to 5 replicas?

kubectl scale deployment mydeployment --replicas=5

kubectl set replicas deployment mydeployment 5

kubectl apply deployment mydeployment --replicas=5

kubectl replicate deployment mydeployment 5

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?