Senior Java / Spring Boot / Microservices — Interview Perspective Guide
Focus: one-line understanding, architecture, YAML, production flow, and senior-level interview answers.
| Concept | AWS | Azure | GCP | Interview Understanding |
|---|---|---|---|---|
| Cloud Platform | AWS | Microsoft Azure | Google Cloud | Cloud provider offering compute, storage, networking, databases, security, monitoring, etc. |
| VM | EC2 | Azure VM | Compute Engine | Virtual machine for workloads requiring an OS. |
| Kubernetes | EKS | AKS | GKE | Managed Kubernetes service. |
| Object Storage | S3 | Blob Storage | Cloud Storage | Stores files/objects such as documents, images, backups. |
| Managed DB | RDS | Azure SQL | Cloud SQL | Managed relational database service. |
| Serverless | Lambda | Azure Functions | Cloud Functions / Cloud Run | Run workloads without managing traditional servers. |
| Secrets | Secrets Manager | Key Vault | Secret Manager | Centralized storage and access control for sensitive values. |
| Monitoring | CloudWatch | Azure Monitor | Cloud Monitoring | Logs, metrics, alerts and operational visibility. |
| Container Registry | ECR | ACR | Artifact Registry | Stores Docker/container images. |
| Load Balancing | ELB / ALB / NLB | Azure Load Balancer / App Gateway | Cloud Load Balancing | Distributes incoming traffic across healthy targets. |
One-line definition: Docker packages an application and its runtime dependencies into a portable container image.
| Term | Meaning | Interview Example |
|---|---|---|
| Dockerfile | Instructions used to build an image. | FROM, COPY, RUN, EXPOSE, ENTRYPOINT |
| Image | Immutable package/template used to create containers. | order-service:1.2.0 |
| Container | Running instance of an image. | Running Order Service process. |
| Registry | Repository for container images. | ECR / ACR / Artifact Registry |
| Volume | Persistent/shared storage mechanism. | Database or file workload storage. |
FROM eclipse-temurin:21-jre WORKDIR /app COPY target/order-service.jar app.jar EXPOSE 8080 ENTRYPOINT ["java", "-jar", "app.jar"]
| Container | VM |
|---|---|
| Shares host OS kernel. | Runs a guest operating system. |
| Lightweight and starts quickly. | Generally heavier and slower to start. |
| Excellent for microservices and CI/CD. | Useful when workload requires OS-level isolation. |
One-line definition: Kubernetes is a container orchestration platform that manages deployment, scaling, networking, health, and self-healing of containerized applications.
| Term | One-Line Understanding | Example |
|---|---|---|
| Cluster | Complete Kubernetes environment containing control plane and worker nodes. | Production EKS cluster. |
| Node | Worker machine where Pods run. | EC2-backed Kubernetes worker. |
| Pod | Smallest deployable Kubernetes unit containing one or more containers. | Pod running order-service. |
| Deployment | Maintains desired Pod replicas and manages rolling updates/rollback. | 3 replicas of Order Service. |
| Service | Stable network endpoint for a changing set of Pods. | order-service:80 |
| Ingress | Kubernetes HTTP/HTTPS routing resource. | orders.example.com → Service |
| Namespace | Logical partition for organizing and isolating resources. | dev / qa / prod |
apiVersion: apps/v1
kind: Deployment
metadata:
name: order-service
spec:
replicas: 3
selector:
matchLabels:
app: order-service
template:
metadata:
labels:
app: order-service
spec:
containers:
- name: order-service
image: order-service:1.0
ports:
- containerPort: 8080
| Section | Purpose |
|---|---|
apiVersion | API version for the Kubernetes resource. |
kind | Resource type, such as Deployment or Service. |
metadata | Name, labels and identifying information. |
spec.replicas | Desired number of Pod replicas. |
selector | Identifies which Pods belong to the Deployment. |
template | Blueprint used to create Pods. |
containers | Container image, ports, resources, environment and probes. |
resources:
requests:
cpu: "250m"
memory: "512Mi"
limits:
cpu: "1"
memory: "1Gi"
Interview point: Requests help Kubernetes schedule the Pod; limits cap the resources the container can consume.
One-line definition: A Service gives a stable DNS/network endpoint and load-balances traffic to matching healthy Pods.
apiVersion: v1
kind: Service
metadata:
name: order-service
spec:
selector:
app: order-service
ports:
- port: 80
targetPort: 8080
| Service Type | Use |
|---|---|
| ClusterIP | Default; internal cluster communication. |
| NodePort | Exposes service through a port on each Node. |
| LoadBalancer | Requests an external load balancer from the cloud provider. |
| ExternalName | Maps a service name to an external DNS name. |
One-line definition: Ingress provides HTTP/HTTPS routing from outside the cluster to Kubernetes Services through an Ingress Controller.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: order-ingress
spec:
rules:
- host: orders.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: order-service
port:
number: 80
One-line definition: An OpenShift Route is an OpenShift-specific resource for exposing a Service externally over HTTP/HTTPS, including TLS termination options.
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: order-service
spec:
to:
kind: Service
name: order-service
port:
targetPort: 8080
tls:
termination: edge
| Deployment | Service | Ingress / Route |
|---|---|---|
| Defines how application Pods run. | Provides stable internal access. | Provides external HTTP/HTTPS routing. |
Purpose: Determines whether the Pod is ready to receive traffic.
readinessProbe:
httpGet:
path: /actuator/health/readiness
port: 8080
initialDelaySeconds: 10
periodSeconds: 10
If readiness fails, the Pod is normally removed from Service endpoints. It is not necessarily restarted.
Purpose: Determines whether the container is alive; repeated failure causes Kubernetes to restart it.
livenessProbe:
httpGet:
path: /actuator/health/liveness
port: 8080
initialDelaySeconds: 30
periodSeconds: 20
Purpose: Gives slow-starting applications time to initialize before liveness checks become effective.
startupProbe:
httpGet:
path: /actuator/health/liveness
port: 8080
failureThreshold: 30
periodSeconds: 10
| Probe | Question | Failure Impact |
|---|---|---|
| Readiness | Can this Pod receive traffic? | Traffic is stopped/removed from endpoints. |
| Liveness | Is this container still healthy enough to run? | Container can be restarted. |
| Startup | Has this slow-starting app finished starting? | Protects it from premature liveness failure. |
One-line definition: Helm packages and templates Kubernetes manifests so the same application can be deployed consistently across environments.
order-service/
├── Chart.yaml
├── values.yaml
└── templates/
├── deployment.yaml
├── service.yaml
├── ingress.yaml
└── route.yaml
replicaCount: 3 image: repository: order-service tag: "1.2.0" service: port: 8080
replicas: {{ .Values.replicaCount }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Secret: Sensitive information such as database passwords, API keys, OAuth client secrets, tokens or private keys.
apiVersion: v1 kind: Secret metadata: name: db-secret type: Opaque stringData: username: appuser password: mypassword
env:
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: db-secret
key: password
| Solution | Best Interview Understanding |
|---|---|
| Kubernetes Secret | Native Kubernetes mechanism for sensitive configuration. |
| AWS Secrets Manager | Managed AWS secret storage with IAM, rotation and auditing capabilities. |
| Azure Key Vault | Managed Azure service for secrets, keys and certificates. |
| GCP Secret Manager | Managed GCP secret storage integrated with IAM. |
| HashiCorp Vault | Enterprise/cross-cloud secret management with strong policy controls and dynamic secrets. |
| Secret Store CSI Driver | Allows Kubernetes Pods to consume secrets from external secret-management systems. |
| Term | One-Line Understanding |
|---|---|
| Server Certificate | Proves the identity of the server to the client. |
| Client Certificate | Used to identify/authenticate the client in mTLS. |
| CA Certificate | Establishes the trusted certificate authority chain. |
| Wildcard Certificate | Can cover multiple subdomains such as *.example.com. |
| Private Key | Secret cryptographic material associated with a certificate. |
Depending on architecture, TLS may terminate at a cloud load balancer, ingress controller, OpenShift Route, API gateway, or the Spring Boot application itself.
One-line definition: OpenShift is Red Hat's enterprise Kubernetes platform with additional security, developer tooling, routing, Operators, lifecycle management and platform integrations.
| Technology | Interview Definition |
|---|---|
| Docker | Packages and runs containers. |
| Kubernetes | Orchestrates containers at scale. |
| OpenShift | Enterprise Kubernetes platform with additional platform capabilities. |
| Resource | One-Line Understanding | Typical Use |
|---|---|---|
| ConfigMap | Stores non-sensitive configuration. | URLs, feature flags, environment settings. |
| Secret | Stores sensitive configuration. | Password, token, key. |
| Namespace | Logical grouping/isolation. | dev, qa, prod. |
| StatefulSet | Manages stateful applications with stable identity/storage. | Databases, clustered stateful systems. |
| DaemonSet | Runs a Pod on each eligible Node. | Logging/monitoring agents. |
| Job | Runs a task to completion. | Batch processing. |
| CronJob | Runs Jobs on a schedule. | Scheduled cleanup/reporting. |
| HPA | Automatically adjusts Pod replicas based on metrics. | CPU/memory/custom metric scaling. |
| PVC | Requests persistent storage. | Persistent application data. |
| ServiceAccount | Identity used by workloads for Kubernetes/API access. | Pod authentication and RBAC. |
1. Kubernetes detects that the actual state differs from the desired state.
2. The Deployment/ReplicaSet reconciliation process creates a replacement Pod.
3. The new Pod starts the Spring Boot application.
4. Startup/readiness checks determine when it is ready.
5. The Service sends traffic only to eligible healthy endpoints.
Interview phrase: “Kubernetes continuously reconciles actual state with desired state.”
Readiness checks help prevent traffic from being sent to a newly started Pod before the application is ready.
“In our microservices architecture, we build the Spring Boot application using Maven and package it as a Docker image. The image is pushed to a container registry and deployed to Kubernetes or OpenShift using Helm. A Deployment manages the desired number of Pods and rolling updates. Each Pod exposes the application on its container port, while a Service provides stable internal service discovery and load balancing. For external access, we use Kubernetes Ingress or an OpenShift Route, usually behind a cloud load balancer. Readiness probes control whether a Pod receives traffic, liveness probes help restart unhealthy containers, and startup probes protect slow-starting applications. Configuration is externalized using ConfigMaps and environment-specific configuration, while sensitive information is managed through Kubernetes Secrets or enterprise secret stores such as cloud Secret Manager/Key Vault/Secrets Manager or Vault. TLS certificates are used to secure external or internal communication.”