Maintenance and Upgrades
User guide to the ayedo SDP 5-maintenance-train model: roles, workload preparation with PDBs and probes, and checking for deprecated Kubernetes APIs.
Maintenance and Upgrades
Regular updates and security patches are the foundation for stable, secure, and compliant operation of the ayedo Software Delivery Platform (SDP). This page explains the platform's maintenance model and shows how to prepare your applications cleanly for maintenance activities and upgrades.
The 5-Maintenance-Train Model
On the SDP, changes are deliberately separated into five decoupled maintenance trains. This separation prevents unnecessary dependencies and keeps the risk of every update manageable:
| Maintenance Train | Scope | Typical Responsibility (Managed SDP) |
|---|---|---|
| 1. OS & Host | Linux security updates, kernel patches, host reboots | Platform Operations |
| 2. Kubernetes | Patch and minor upgrades of the Kubernetes version (k3s control plane & workers) | Platform Operations |
| 3. Platform Components | CNI (Cilium), Ingress/Gateway (NGINX, Envoy), cert-manager, policy and security components | Platform Operations |
| 4. Dependencies | Databases (e.g., CloudNativePG, MongoDB), registry (Harbor), observability, backup components | Platform Operations or by agreement |
| 5. Application Release | Your own container images, Helm charts, and app configurations | Development Team / Customer |
For Self-Managed instances of the SDP, scheduling and executing all five trains lies with your own operations team; maintaining the logical separation of trains is equally recommended there.
Shared Responsibility During Maintenance
Even when platform operations coordinates and rolls out OS, Kubernetes, and platform upgrades systematically, your application architecture determines whether end users notice anything at all:
- Platform Side: Executes upgrades in a structured manner, drains nodes cleanly before reboots, and respects defined
PodDisruptionBudgets. - Application Side: Ensures multiple replicas are running, pods shut down gracefully, readiness probes respond accurately, and no deprecated Kubernetes API versions are used.
How to Prepare Your Workloads
1. Multiple Replicas and Distribution Across Nodes
A Deployment with only a single replica is inevitably unreachable briefly during a node reboot. Run production workloads with at least two replicas and spread them across different nodes:
spec:
replicas: 2
template:
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: my-app
2. Define PodDisruptionBudgets (PDB)
A PodDisruptionBudget tells Kubernetes how many pods must remain available simultaneously during planned node drains:
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: my-app-pdb
namespace: acme-production
spec:
minAvailable: 1
selector:
matchLabels:
app: my-app
3. Readiness Probes and Graceful Shutdown
During a node drain, Kubernetes removes a pod from Service routing and then sends SIGTERM:
- Readiness Probe: Ensures new pods only receive traffic once the application is genuinely ready.
- Graceful Shutdown: Your application should catch
SIGTERM, stop accepting new connections, and complete in-flight requests cleanly. terminationGracePeriodSeconds: Adjust the grace period if your application requires longer than the default 30 seconds to shut down cleanly.
spec:
terminationGracePeriodSeconds: 45
containers:
- name: my-app
readinessProbe:
httpGet:
path: /ready
port: http
initialDelaySeconds: 5
periodSeconds: 5
lifecycle:
preStop:
exec:
command: ["sh", "-c", "sleep 5"]
4. Check for Deprecated Kubernetes APIs
Ahead of Kubernetes minor upgrades, older API versions are periodically removed (for instance, legacy v1beta1 resources). Regularly verify that your Helm charts and GitOps manifests use current, stable API versions:
networking.k8s.io/v1forIngresspolicy/v1forPodDisruptionBudgetautoscaling/v2forHorizontalPodAutoscalerbatch/v1forCronJobandJob
Useful tools for statically checking your manifests before an upgrade include pluto or kubent run directly against your Git repositories or namespace.
5. Make Database Connections Resilient
Maintenance on database dependencies (such as CloudNativePG or Managed MongoDB) can involve a planned primary failover. Configure your application drivers so that:
- dropped connections are automatically re-established (connection pooling with reconnect),
- read/write operations briefly retry on transient errors (retry logic),
- applications connect via the provided Service DNS names rather than hardcoded pod IPs.
Rollforward Over Rollback
For application releases (Maintenance Train 5), follow the principle of fixing forward (rollforward) or — for stateless services — a controlled revert to the previous immutable image tag via GitOps (Argo CD).
Pre-Maintenance Checklist
- [ ] Production workloads run with
replicas >= 2and a properly configuredPodDisruptionBudget - [ ] Readiness/liveness probes and
SIGTERMhandling have been tested - [ ] Manifests and charts do not use deprecated Kubernetes API versions
- [ ] If needed, a targeted Grafana Silence is set for planned app maintenance
- [ ] Current backups for databases and persistent data have been verified