JavaThinking.com
Toggle Menu
Home
Online Kotlin Compiler
Tutorials
Spring Boot
Spring Cloud
Spring Data
Spring MVC
Spring Security
Blog
All Posts
Spring Boot with Docker and Kubernetes
Test your knowledge of containerization and deployment of Spring Boot applications.
1. Which annotation is required on the main class to bootstrap a Spring Boot application?
@SpringBootStarter
@Application
@SpringBootApplication
@Main
2. Which Kubernetes components are responsible for managing the lifecycle of pods?
Deployment
StatefulSet
Pod
Service
3. Docker containers are immutable by default.
True
False
4. What command is used to build a Docker image from a Dockerfile in the current directory (include the context)?
5. Which embedded server is included by default in the spring-boot-starter-web dependency?
Tomcat
Jetty
Undertow
None
6. What are benefits of containerizing Spring Boot applications with Docker?
Consistent development and production environments
Simplified dependency isolation
Increased resource overhead compared to VMs
Easier horizontal scaling
7. Kubernetes Pods in different namespaces can communicate with each other without any additional configuration.
True
False
8. What Kubernetes resource type is used to expose a Spring Boot application running in a pod to external network traffic?
9. In Kubernetes, which resource declaratively manages the deployment and scaling of a Spring Boot application?
Pod
Deployment
ConfigMap
Secret
10. Which of the following are valid kubectl commands for interacting with Kubernetes resources?
kubectl get pods
kubectl create deployment
kubectl deploy myapp
kubectl delete service
Reset
Answered 0 of 0 — 0 correct