0
0
Dockerdevops~20 mins

Swarm vs Kubernetes decision in Docker - Practice Questions

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Swarm vs Kubernetes Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Choosing between Docker Swarm and Kubernetes for a small project

You have a small web app project with simple scaling needs and limited team experience in container orchestration. Which container orchestration tool is the best fit?

ADocker Swarm, because it is simpler to set up and manage for small teams.
BKubernetes, because it requires less configuration and is easier for beginners.
CKubernetes, because it is lightweight and perfect for small projects.
DDocker Swarm, because it has more advanced features than Kubernetes.
Attempts:
2 left
💡 Hint

Think about ease of use and team experience for small projects.

💻 Command Output
intermediate
2:00remaining
Output of 'kubectl get nodes' in a single-node Kubernetes cluster

What is the expected output of the command kubectl get nodes on a freshly installed single-node Kubernetes cluster?

Docker
kubectl get nodes
AError from server (NotFound): nodes "node1" not found
B
NAME           STATUS   ROLES           AGE   VERSION
node1          Ready    control-plane   5m    v1.26.0
C
NAME           STATUS   ROLES           AGE   VERSION
node1          Ready    worker          5m    v1.26.0
D
NAME           STATUS    AGE   VERSION
node1          NotReady  5m    v1.26.0
Attempts:
2 left
💡 Hint

Consider the default role assigned to the single node in Kubernetes.

🔀 Workflow
advanced
3:00remaining
Deploying a multi-service app with Docker Swarm

You want to deploy a multi-service app using Docker Swarm with automatic service discovery and load balancing. Which sequence of commands correctly initializes the swarm and deploys the app using a stack file?

A1,2,3,4
B2,1,3,4
C1,4,2,3
D4,1,2,3
Attempts:
2 left
💡 Hint

Think about the order: initialize swarm, deploy stack, then check services and nodes.

Troubleshoot
advanced
2:00remaining
Kubernetes pod stuck in Pending state

You deployed a pod in Kubernetes, but it stays in the Pending state indefinitely. What is the most likely cause?

AThe pod's YAML file has a syntax error.
BThe pod's container image is missing from the registry.
CThere are no nodes with enough resources to schedule the pod.
DThe Kubernetes API server is down.
Attempts:
2 left
💡 Hint

Pending means the pod is waiting to be scheduled on a node.

Best Practice
expert
2:30remaining
Best practice for managing secrets in Kubernetes vs Docker Swarm

Which statement correctly describes the best practice for managing sensitive data (secrets) in Kubernetes compared to Docker Swarm?

AKubernetes encrypts secrets at rest by default, while Docker Swarm stores secrets unencrypted on disk.
BKubernetes does not support secrets management, Docker Swarm has built-in secret management.
CBoth Kubernetes and Docker Swarm store secrets only in environment variables, which is insecure.
DDocker Swarm encrypts secrets in transit and at rest by default, Kubernetes requires manual encryption setup.
Attempts:
2 left
💡 Hint

Consider how each platform handles secret encryption by default.