0
0
Kubernetesdevops~10 mins

What is Kubernetes - Interactive Quiz & Practice

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

Complete the code to create a Kubernetes pod manifest with a single container.

Kubernetes
apiVersion: v1
kind: Pod
metadata:
  name: my-pod
spec:
  containers:
  - name: my-container
    image: [1]
Drag options to blanks, or click blank then click option'
Anginx
Bdocker
Ckubectl
Dpodman
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker' or 'kubectl' as image names, which are tools not images.
2fill in blank
medium

Complete the command to list all pods in the default namespace.

Kubernetes
kubectl [1] pods
Drag options to blanks, or click blank then click option'
Aget
Bcreate
Cdelete
Dapply
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'create' or 'delete' which modify resources instead of listing them.
3fill in blank
hard

Fix the error in the command to apply a configuration file named pod.yaml.

Kubernetes
kubectl [1] -f pod.yaml
Drag options to blanks, or click blank then click option'
Adelete
Bget
Capply
Ddescribe
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'get' or 'describe' which only show information, not apply changes.
4fill in blank
hard

Fill both blanks to create a service that exposes pods on port 80.

Kubernetes
apiVersion: v1
kind: Service
metadata:
  name: my-service
spec:
  selector:
    app: [1]
  ports:
  - protocol: TCP
    port: [2]
Drag options to blanks, or click blank then click option'
Awebapp
Bdatabase
C80
D443
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong labels or ports like 443 which is for HTTPS.
5fill in blank
hard

Fill all three blanks to create a deployment with 3 replicas of nginx pods.

Kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  replicas: [1]
  selector:
    matchLabels:
      app: [2]
  template:
    metadata:
      labels:
        app: [3]
    spec:
      containers:
      - name: nginx
        image: nginx
Drag options to blanks, or click blank then click option'
A3
Bnginx-app
Cnginx
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Mismatching labels or wrong replica count.