Engineering notes
Kubernetes for Growing Software Products
Decide when orchestration earns its operating cost, then design deployments, health probes, resource budgets and autoscaling around the application’s actual constraints.
Kubernetes reconciles declared workload state with the state of a cluster. It can replace failed containers and coordinate application replicas, but it does not make an application correct, remove database limits or operate itself. For a growing product, the first decision is whether the benefits of orchestration justify its maintenance and ownership costs.
Make the adoption decision before writing manifests
List the problem being solved: multiple independently deployed workloads, repeatable rollout policies, resource scheduling or an established platform standard. Compare a managed application platform or a small container deployment against a managed Kubernetes cluster. A single application with modest operational needs may be easier to run with less orchestration.
Include platform upgrades, network configuration, access control, incident response and capacity planning in the comparison. Managed Kubernetes reduces some control-plane work; it does not own application probes, permissions, data recovery or every infrastructure dependency. Assign an operator and a service owner before adding production workloads.
Conceptual illustration of the topic; not an implementation diagram.
Treat deployment as controlled replacement
Use a Deployment for replaceable application replicas and a Service for stable access to the selected pods. Build an immutable image and promote the same tested artifact. Declare configuration separately and handle secrets through the platform’s access and encryption model; a Kubernetes Secret object is not automatically a complete secret-management strategy.
A rolling update needs enough spare capacity to start replacements while preserving acceptable availability. Set rollout parameters with the application’s startup time and load profile in mind. Graceful termination should stop accepting new work and allow bounded completion of in-flight requests. Database migration compatibility is still the application’s responsibility.
Give startup, readiness and liveness different meanings
A startup probe protects slow initialization by delaying the other probes until startup succeeds. Readiness indicates whether a pod should receive Service traffic; failure normally removes it from the ready endpoints. Liveness indicates a condition for restarting the container. These are different controls and should not all call an expensive dependency check.
If a shared database fails, restarting every application container may amplify connection storms without repairing the database. Design probes around actionable local conditions and the product’s serving policy. Keep them cheap, test their failure behavior and choose thresholds that tolerate normal variation without concealing a stuck process.
Budget resources before enabling autoscaling
Requests guide scheduling and also matter for utilization-based autoscaling. Limits constrain resource use: CPU limits can cause throttling, and exceeding a memory limit can lead to termination. Size requests and limits from measured behavior, including startup and batch work, rather than copying values from another service.
The HorizontalPodAutoscaler can adjust replicas from supported metrics, provided the metrics pipeline is available. It does not create node capacity or increase database throughput by itself. Choose a metric related to the bottleneck and allow time for startup. More pods can multiply connection pools and worsen an overloaded database, so bound the replica range and downstream concurrency together.
Keep state and disruption in the operating plan
A persistent volume is not a backup. A StatefulSet provides stable workload identity and storage association; it does not automatically solve database replication, failover or restoration. A managed database outside the cluster may reduce operational scope, but its access, recovery objectives and failure modes still need ownership.
Spread replicas across failure domains where the platform supports it and the requirements justify the cost. Pod disruption budgets help constrain certain voluntary disruptions; they are not a guarantee against node failure or every rollout problem. Test node maintenance, pod termination and dependency loss with the actual deployment policies.
Prove that the platform improves the product
Measure release success, recovery time, resource utilization and operator effort before and after adoption. Monitor application outcomes as well as pod status. A green cluster can still serve failed orders, and a successful rollout can still deploy an incompatible schema assumption.
Common mistakes are introducing Kubernetes before assigning ownership, using liveness to test every dependency, enabling autoscaling without connection budgets and relying on a volume as the only recovery plan. Start with the smallest supported platform configuration, document its limitations and expand only when the product’s needs justify the additional components.
References and further reading
Kubernetes: Horizontal Pod Autoscaling
Related content
Cloud Infrastructure, Deployment and DevOps Services
Application deployment, CI/CD, containerisation and observability, with operating responsibilities designed around the needs of your business.
Web Application Deployment and Maintenance: A Practical Checklist
A practical deployment checklist for business applications: releases, persistent data, configuration, monitoring, backups, recovery and clear maintenance responsibilities.
Scaling Django and FastAPI Applications
Scale Python applications by profiling queries, choosing the right concurrency model and budgeting workers, memory and database connections together.
Apply these decisions to your product
Describe the workload, current constraint and product goal to define the scope of a technical discussion.
Discuss your project
