0
0
Kubernetesdevops~10 mins

Pod definition in YAML 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: v1
kind: [1]
metadata:
  name: my-pod
Drag options to blanks, or click blank then click option'
AService
BPod
CDeployment
DConfigMap
Attempts:
3 left
💡 Hint
Common Mistakes
Using Deployment or Service instead of Pod.
2fill in blank
medium

Complete the code to define the container image in the pod spec.

Kubernetes
spec:
  containers:
  - name: my-container
    image: [1]
Drag options to blanks, or click blank then click option'
A8080
Bmy-container
Cnginx:latest
DPod
Attempts:
3 left
💡 Hint
Common Mistakes
Putting container name or port instead of image.
3fill in blank
hard

Fix the error in the container port definition.

Kubernetes
spec:
  containers:
  - name: app
    image: busybox
    ports:
    - containerPort: [1]
Drag options to blanks, or click blank then click option'
A80
Beighty
Cport
DcontainerPort
Attempts:
3 left
💡 Hint
Common Mistakes
Using words like 'eighty' instead of numbers.
4fill in blank
hard

Fill both blanks to define a pod with two containers named 'web' and 'db'.

Kubernetes
spec:
  containers:
  - name: [1]
    image: nginx
  - name: [2]
    image: mysql
Drag options to blanks, or click blank then click option'
Aweb
Bdatabase
Cdb
Dbackend
Attempts:
3 left
💡 Hint
Common Mistakes
Using unrelated names like 'database' or 'backend'.
5fill in blank
hard

Fill all three blanks to create a pod spec with a container named 'app', image 'python:3.12', and port 5000.

Kubernetes
spec:
  containers:
  - name: [1]
    image: [2]
    ports:
    - containerPort: [3]
Drag options to blanks, or click blank then click option'
Aapp
Bpython:3.12
C5000
Dweb
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong container names or image tags, or non-numeric ports.