0
0
Kubernetesdevops~10 mins

Why Pods are the smallest deployable unit in Kubernetes - 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 Pod with a single container named nginx.

Kubernetes
kubectl run mypod --image=nginx --restart=[1]
Drag options to blanks, or click blank then click option'
ANever
BAlways
COnFailure
DManual
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Always' creates a Deployment, not a Pod.
2fill in blank
medium

Complete the YAML snippet to define a Pod with one container named 'app'.

Kubernetes
apiVersion: v1
kind: Pod
metadata:
  name: mypod
spec:
  containers:
  - name: [1]
    image: busybox
Drag options to blanks, or click blank then click option'
Aweb
Bapp
Cnginx
Dcontainer
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'nginx' or 'web' instead of 'app'.
3fill in blank
hard

Fix the error in the command to get Pod details.

Kubernetes
kubectl get [1] mypod
Drag options to blanks, or click blank then click option'
Aservices
Bdeployments
Cpods
Dnodes
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'deployment' or 'service' instead of 'pods'.
4fill in blank
hard

Fill both blanks to create a Pod spec 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
Bapp
Cdb
Dcache
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping container names or using unrelated names like 'cache'.
5fill in blank
hard

Fill all three blanks to create a Pod with a container named 'api', image 'myapi:latest', and restart policy 'Always'.

Kubernetes
apiVersion: v1
kind: Pod
metadata:
  name: apipod
spec:
  containers:
  - name: [1]
    image: [2]
  restartPolicy: [3]
Drag options to blanks, or click blank then click option'
Aapi
Bmyapi:latest
CAlways
DNever
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong container names, images, or restart policies.