Mikhail Kabishchev
guest
guest
guest
The second Kubernetes Patterns episode covers behavioral patterns and draws a platform boundary: the rich API should not be handed to every application without constraints. The patterns express execution, instance coordination, state, and service discovery through managed primitives.
A Batch Job completes a specified amount of work and retries after failure; a CronJob adds schedules, deadlines, and concurrency policy. For frequent short tasks, a persistent process can be cheaper than creating pods. A DaemonSet places an agent on each selected node, useful for logs and metrics but costly when resources leak or are oversized.
A Singleton Service needs a leader: a lease or external lock lets active-passive instances cooperate without trusting an immortal pod. Stateless services behave like interchangeable cattle. StatefulSet adds stable identity, order, and storage, yet a complex database often needs a specialized operator.
Service Discovery compares ClusterIP, headless services, and client-side balancing; external Layer 7 traffic adds Ingress and its controller, while a service mesh extends the model internally. Self Awareness receives metadata through the Downward API. Direct API access remains risky, so roles and service accounts should be minimal.