What types of Jenkins agents (build executors) are there, and which do you use?
Quick Answer
Static EC2/VM agents, Docker-based agents, dynamic Kubernetes agents (pods spun up per build via the Kubernetes plugin), and self-hosted runners. Dynamic Kubernetes agents are preferred for elastic, isolated builds.
Detailed Answer
Static agents are simple but idle-costly and prone to state drift between builds. Dynamic agents (one ephemeral pod/container per build) give clean, isolated, right-sized executors that scale to zero when idle — cheaper and more reproducible. Keep the controller lightweight and run all builds on agents, never on the controller itself.
Interview Tip
Argue for ephemeral per-build agents (clean, isolated, scale-to-zero) and never running builds on the controller.