Apache Spark Big Data (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)
Spark on Kubernetes (K8s): Native Spark operator, executor pod lifecycle, dynamic PVC allocation, and spot instances.
senior LevelMost AskedLifecycleKubernetes
In Simple Words: Running Spark natively inside Kubernetes without YARN:
- Spark K8s Operator: Manages Spark applications declaratively using custom resources (
SparkApplication). - Driver Pod: Spun up first; acts as the controller that requests executor pods via the Kubernetes API server.
- Spot Instances & Graceful Decommissioning: When cloud providers issue a 2-minute spot eviction notice, Spark's Graceful Decommissioning automatically migrates cached blocks and shuffle files off the doomed executor to surviving nodes before the pod is terminated.