PodDisruptionBudgets and Node Drains in Kubernetes: Writing the Budget and Why Maintenance Gets Stuck
A PodDisruptionBudget only limits voluntary disruptions, and a badly written one either protects nothing or blocks node drains forever. Choosing between minAvailable and maxUnavailable, the unhealthy pod eviction policy, and the pitfalls of draining nodes.
Nodes in a Kubernetes cluster get drained all the time: for OS and kubelet upgrades, when the autoscaler removes spare capacity, when hardware is replaced. Every one of these is a voluntary disruption, meaning whoever operates the cluster is deliberately moving a pod. A PodDisruptionBudget (PDB) exists for exactly these moments and states "no more than this many of my pods may be gone at once". It is a tiny object, yet a badly written one produces one of two outcomes: it protects nothing, or it blocks every maintenance operation indefinitely.
What a PDB protects, and what it does not
A PDB only limits requests that go through the Eviction API. kubectl drain, the cluster autoscaler and node pool upgrades in managed services all use that API. When the budget does not allow an eviction, the API answers with HTTP 429 and the caller retries later.
What it does not cover matters just as much:
Involuntary disruptions such as a node crash, a kernel panic or a process killed for running out of memory. A PDB cannot prevent them; they are simply counted against the budget, which makes subsequent voluntary evictions more cautious.
Deleting a pod directly with kubectl delete pod. Deletion does not go through the Eviction API.
A Deployment's own rolling update. How many pods go away during a rollout is decided by maxUnavailable and maxSurge on the Deployment, not by the PDB.
Teams often assume "we added a PDB, so we have no downtime". All a PDB really does is make the people operating the cluster respect your application's limits.
minAvailable or maxUnavailable
There are two fields and a single PDB may use only one of them. Both accept an integer or a percentage.
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: api
spec:
maxUnavailable: 1
selector:
matchLabels:
app: api
In most cases I prefer maxUnavailable. The reason: minAvailable: 2 is independent of the replica count. If the application is later scaled down to two replicas, the budget silently becomes zero allowed disruptions and drains start hanging. maxUnavailable: 1 keeps allowing one pod to leave no matter how the replica count changes, so it stays correct as you scale.
minAvailable is the right choice when there is a hard floor. A three member quorum system needs at least two members up, and minAvailable: 2 expresses that intent most clearly. Even so, maxUnavailable: 1 gives the same result for three members and stays sensible when you grow to five.
With percentages, rounding on small replica counts can surprise you. Rather than doing the math in your head, apply the PDB and look at the ALLOWED DISRUPTIONS column of kubectl get pdb. If it reads zero, a drain will wait on that application.
cordon stops new pods from being scheduled on the node. drain does the same and then evicts pods. DaemonSet pods are skipped because they run on every node anyway, and for pods using emptyDir you have to explicitly accept that the data is lost. If there are bare pods not owned by any controller, drain stops, because nothing would recreate them after eviction. --force overrides that check, and the pod is then really gone.
Without --timeout, drain waits for the budget forever. In automation always set a limit and treat hitting it as a failure; a script that quietly moves on to the next node accumulates half finished maintenance.
Pitfalls
A PDB on a single replica. A one replica Deployment guarded by minAvailable: 1 or maxUnavailable: 0 can never be evicted, and the drain waits on it forever. Managed services differ here: some ignore the budget after a grace period and delete the pod anyway, others mark the upgrade as failed. Neither is what you wanted. A single replica application already accepts downtime; instead of hiding that behind a PDB, either add replicas or skip the PDB and accept the brief outage.
Unhealthy pods lock the budget. A PDB counts pods that are Ready. If one pod of an application is crash looping, the budget already looks exhausted and the healthy pods cannot be evicted. Worse, the broken pod cannot be evicted either. unhealthyPodEvictionPolicy: AlwaysAllow, enabled by default since Kubernetes 1.27, lets pods that are not ready be evicted regardless of the budget. For most stateless services this is the right setting, since protecting a broken pod helps nobody.
spec:
maxUnavailable: 1
unhealthyPodEvictionPolicy: AlwaysAllow
selector:
matchLabels:
app: api
Readiness time slows every drain. The budget does not open again until the replacement pod is Ready. For applications that take minutes to start, warm a cache or load a large dataset, upgrading a twenty node pool can take hours. Make sure the readiness probe measures actual readiness to serve traffic and is not padded with needless delays.
The selector does not match the real pods. A PDB whose selector matches nothing raises no error; it just protects nothing. This happens quietly when labels are renamed. The opposite is also a problem: if a pod falls under more than one PDB, the Eviction API refuses to evict it and the drain gets stuck. Keep one PDB per application with a selector identical to the Deployment's selector.
All replicas on one node. A PDB says how many pods may leave at once, not where they run. If all three replicas sit on the same node and that node dies, the PDB can do nothing. Spread replicas across nodes, and across zones where possible, with topologySpreadConstraints. Budget and spreading work together; either one alone is incomplete.
No spare capacity, no open budget. If there is nowhere for the evicted pods to go, the replacements stay Pending, never become Ready, and the budget stays closed. For node upgrades, add the new node first and drain the old one afterwards. Most managed services expose this as a surge setting.
When not to use a PDB
Single replica workloads that tolerate downtime, batch Jobs and development environments usually gain nothing from a PDB and pay for it in stuck maintenance. For batch work, eviction restarts the job, but protecting it with a PDB ties node maintenance to the job's runtime; making the job safely restartable is the sturdier fix.
Likewise, in a cluster where node pool upgrades are automated, letting every team write arbitrary PDBs means a single bad budget can halt upgrades for the whole cluster. The practical guard is an admission controller or policy engine that rejects locking values such as maxUnavailable: 0 and refuses PDBs on single replica workloads.
A short checklist
For each stateless service, a reasonable baseline is at least two replicas, maxUnavailable: 1, unhealthyPodEvictionPolicy: AlwaysAllow and a placement rule that spreads replicas across nodes. For stateful services that need a quorum, derive the budget from the quorum math and define readiness so that it proves the member has actually rejoined the cluster. Finally, test all of this by draining a node on an ordinary day, not on maintenance day. Every application showing zero in ALLOWED DISRUPTIONS is the one that will keep you waiting when it counts.
[OK] 30 records · 9 featured · 1 retainer · 20 standard
/02 services
services.tree
> note
· Prices are in USD. Volume discounts of 7% for 6-12 day projects and 14% for 13+ day projects apply. Programs of 100+ person-days are priced individually. Prices are negotiable based on scope, urgency and long-term collaboration.
> ls ~/products/ --open-source
[OK] 2 entries · 1 live · 1 pre-release
/03 products
products.list
liveopen source · mit/prod/01
filex
the self-hosted file manager that embeds anywhere
single go binary · vue/react/web-component embed · 5 storage drivers · realtime collab · rbac · native multi-tenancy · mcp server for ai agents
We build infrastructure, automate everything, and keep systems running.
BRF Tech is a Bursa-based DevSecOps and software consulting firm. We operate across 30 service areas, from Kubernetes cluster management to serverless platform setup, CI/CD pipeline design to AI agent development.
What we do is simple: we set up your systems, automate them, and make sure they won't wake you up at 3 AM. We codify your infrastructure with Terraform, move your deployments to GitOps with ArgoCD, and monitor everything with Prometheus. If something breaks — we intervene before it does.
We're against vendor lock-in. We work with open-source tools, self-hosted solutions, and industry-standard technologies. We build your own serverless platform on Knative, isolate with Kata Containers, manage your secrets with Vault. Every project is delivered with clear scope, clear timeline, clear pricing.
DevSecOps & CI/CD
Kubernetes & Serverless
Infrastructure as Code
AI & Agent (MCP/ACP)
Security & Zero Trust
Full-Stack Development
Self-Hosted Solutions
> grep -i question ~/faq.md
[OK] 3 entries · click to expand
[?]What services are included in BRF Tech's DevOps solutions?▾
We offer CI/CD pipeline setup, Kubernetes cluster management, container migration, infrastructure automation with Terraform, monitoring & alerting, in-house technology installations and DevOps consulting services.
[?]What are your software development services?▾
We offer MVP development, existing software performance optimization, backend API development (Node.js, Go, Python) and full-stack application development. Every project is delivered with minimal technical debt.
[?]Which DevOps tools do you work with?▾
From Kubernetes and Docker to Talos Linux, from Terraform and OpenTofu to Ansible, and across Jenkins, GitLab CI/CD, GitHub Actions, ArgoCD, Flux, Helm and Rancher, we work with industry-standard tooling. For observability and error tracking we use Prometheus, Grafana, Loki, Tempo, OpenTelemetry and GlitchTip; for networking, Cilium and Envoy; for test automation, Playwright, Cypress, k6, Locust, Testcontainers and Trivy. We determine the most suitable toolset together, based on your project’s needs.
Automated build, test and deployment pipelines with GitHub Actions, GitLab CI/CD.
Automated build, test and deploy pipeline setup for existing or new repositories. GitHub Actions, GitLab CI/CD or preferred tool is used. Separate workflows are defined for staging + production environments.
Container architecture migration, cluster setup and orchestration.
Production-ready Kubernetes cluster setup on bare-metal or cloud. Includes Helm charts, Ingress, TLS certificate management, namespace isolation and RBAC.
Cozystack is an open-source cloud platform built on Kubernetes and the VMware alternative we recommend most. Virtual machines run on KubeVirt, while managed PostgreSQL, MySQL, Redis and Kafka services and dedicated tenant Kubernetes clusters are provisioned from the same dashboard and API. Includes installation on your own bare-metal servers on Talos Linux, replicated storage with LINSTOR/DRBD, network isolation with Kube-OVN, tenant and quota structure, monitoring, backup and a disaster recovery plan. After deployment we also handle upgrades, operations and support; since the platform is open source, there are no license fees and no vendor lock-in.
Packages
Virtual machine support on an existing Kubernetes cluster with KubeVirt
$2,800
4–6 person-day
Pilot setup (3 nodes, virtual machines + managed database)
$3,500
5–8 person-day
Production setup (HA + replicated storage + monitoring + backup)
$6,500
10–16 person-day
Multi-tenant private cloud (tenants, quotas, managed service catalog)
Planned, low-downtime migration of vSphere/ESXi environments to Cozystack, OpenStack or VHI.
A planned move to a VMware alternative for environments whose costs rose after Broadcom moved VMware licensing to subscription bundles, or whose renewal is coming up. We start with an inventory of your vSphere/ESXi estate (virtual machines, disks, networks, dependencies), then compare today's license cost with the total cost of the target platform. In most environments the target is Cozystack; OpenStack fits large-scale IaaS needs and Virtuozzo Hybrid Infrastructure fits storage-heavy service providers. A pilot runs on non-critical virtual machines, disks are converted with tools such as virt-v2v and Forklift, and the migration proceeds in waves within maintenance windows, with a rollback plan for every step.
Packages
Inventory + cost comparison + migration plan
$2,400
3–5 person-day
Pilot migration (up to 10 virtual machines)
$3,500
5–8 person-day
Phased migration (up to 100 virtual machines)
$9,750
15–22 person-day
Full data center migration (network + storage + backup)
OpenStack deployment, Neutron networking, Ceph/Cinder storage, upgrades and operations.
OpenStack deployment and operations in your own data center. A containerized, highly available control plane with Kolla-Ansible; Nova (compute), Keystone (identity), Glance (images) and Horizon (dashboard). On the network side, Neutron with OVN, VLAN/VXLAN, provider and tenant networks, floating IPs and the Octavia load balancer; on the storage side, Cinder block storage on Ceph RBD and optional S3-compatible object storage. For existing deployments: health checks, planned upgrades between releases, monitoring and alerting setup, and a backup strategy.
Packages
Health check + improvement report (existing deployment)
$2,400
3–5 person-day
Lab / PoC setup (single region, 3 nodes)
$3,500
5–8 person-day
Release upgrade (existing deployment)
$3,900
6–10 person-day
Production setup (HA control plane + Ceph + Neutron/OVN)
Hyperconverged infrastructure: multi-tenant cloud plus block and S3-compatible storage for service providers.
Hyperconverged infrastructure with Virtuozzo Hybrid Infrastructure, where compute, storage and networking run on the same servers. Block, S3-compatible object and NFS storage on software-defined storage, plus backup storage (Backup Gateway) for backup products such as Acronis. For service providers: a multi-tenant cloud with domains and projects, quotas, a self-service panel and an OpenStack-compatible API. Includes hardware sizing, network design, cluster deployment and expansion, version upgrades and operations support.
Packages
Pre-deployment assessment + hardware sizing
$2,400
3–4 person-day
Version upgrade / cluster expansion
$2,800
4–6 person-day
Hyperconverged cluster setup (storage + compute)
$3,900
6–10 person-day
Service provider setup (multi-tenant cloud + S3 + backup storage)
Migration of existing applications to container architecture.
Migration of existing applications to container architecture. Docker image design, Compose configuration and conversion to Kubernetes manifests. Kata Containers / gVisor can be included for advanced isolation.
Health check of your current environment, capacity planning, platform selection and a roadmap.
An independent assessment of your current virtualization environment (VMware vSphere, OpenStack, VHI or other KVM-based platforms). The health check covers cluster configuration, resource overcommit, storage latency, forgotten snapshots, backup and patch status. Capacity planning measures CPU, memory and storage growth to work out the hardware you will need next. Platform selection decides which workload should run where: Cozystack for teams running containers and virtual machines side by side, OpenStack for large-scale IaaS, VHI for storage-heavy service providers; staying on the current platform is also an option for some workloads. The deliverable is a written report with a cost comparison and a prioritized roadmap.
In-house tools like GitLab, Nextcloud, VPN, mail server.
Installation of tools like GitLab, Mattermost, Nextcloud, mail server, VPN, internal monitoring on company servers. Deployed on Docker Compose or Kubernetes.
DB + cache + code bottleneck identification and resolution.
Profiling of existing application, identification and resolution of bottlenecks. DB query optimization, caching layer (Redis), service-level improvements.
MCP/ACP agents, RAG pipelines, multi-agent orchestration, model serving.
LLM integration (OpenAI, Claude, Gemini, local models), tool-augmented AI agents with MCP (Model Context Protocol) and ACP (Agent Communication Protocol). RAG pipeline, multi-agent orchestration, model serving (vLLM/Ollama). AI layer for existing business processes.
Event-driven data pipeline with Apache Kafka, RabbitMQ, NATS. ETL/ELT orchestration with Apache Airflow, real-time data streaming, CDC (Change Data Capture). Data lake/warehouse design, schema registry, dead letter queue management.
Packages
Kafka/RabbitMQ setup + basic producer/consumer
$3,500
5–7 person-day
ETL pipeline (Airflow + source → warehouse)
$5,200
8–12 person-day
Full event-driven architecture (CDC + streaming + DLQ)
Hands-on technical training for your teams. Docker & container fundamentals, Kubernetes operations, Terraform IaC, CI/CD best practices, AI/LLM integration workshops. Practical exercises in live lab environments, content customized by skill level.
E2E test automation with Playwright, Cypress, load testing with k6/Gatling. Pre-deploy quality gate integrated into CI/CD pipeline, test coverage reporting, visual regression testing. Reduce test writing time by up to 60% with AI-assisted test generation.
Your Collected Personal Data, Collection Method and Legal Basis
Any information that identifies or makes you identifiable is considered "personal data." When you visit our website or use our services, contact information such as your name, surname, email address, phone number, as well as your IP address and browser cookie data may be collected through automatic or semi-automatic means. This data is processed based on the legal grounds specified in Article 5 of the Personal Data Protection Law No. 6698: "being directly related to the establishment or performance of a contract" and "being mandatory for the legitimate interests of the data controller, provided that it does not harm the fundamental rights and freedoms of the data subject."
Purpose of Processing Your Personal Data
Your collected personal data is processed for the purposes of providing and improving our services, fulfilling customer requests, meeting legal obligations, conducting information security processes and managing communication activities. Your data is processed in a limited and proportionate manner for the stated purposes; when the purpose ceases to exist, data is deleted, destroyed or anonymized.
To Whom and For What Purposes Collected Personal Data May Be Transferred
Your personal data may be transferred to public institutions and organizations as required by legal regulations, to our business partners and technical infrastructure providers for the purpose of delivering services, and to lawyers and consultants in legal disputes. Transfers are carried out in accordance with Articles 8 and 9 of the Law, with necessary technical and administrative measures in place.
Your Rights as a Data Subject
In accordance with Article 11 of Law No. 6698, you have the right to: learn whether your personal data is being processed; request information if it has been processed; learn the purpose of processing and whether it is used in accordance with its purpose; know the third parties to whom it is transferred domestically or abroad; request correction if it has been processed incompletely or incorrectly; request deletion or destruction within the framework of conditions set out in Article 7 of the Law; request that the operations carried out be notified to third parties to whom data has been transferred; object to any adverse result arising from the analysis of data exclusively through automated systems; and claim compensation for damages in case of unlawful processing. You may contact us through the communication channels on our website to exercise these rights.
Terms & Conditions
Terms & Conditions
1. Service Scope and Changes
BRF Tech conducts its software development, DevOps consulting, infrastructure setup and technical support services within the framework of these terms and conditions. The scope of service is determined separately for each project and finalized through mutual agreement. BRF Tech reserves the right to update the scope, pricing and technical details of its services, provided that prior notice is given.
2. Privacy Policy
Personal data collected within the scope of our services is processed in accordance with our Privacy Policy. For detailed information, please review our Privacy Policy page.
3. Service Usage and Responsibilities
Clients agree to use the provided services solely within legal and ethical boundaries. BRF Tech reserves the right to suspend or terminate services in the event of misuse, violation of third-party rights, or use for illegal activities. The client is responsible for the accuracy and currency of the information provided within the project scope.
4. Payment Terms
Payment terms are determined on a project basis and finalized through mutual agreement at the start of the project. Unless otherwise specified, invoices are payable within 15 days of project delivery. A monthly late payment interest of 2% may apply to overdue payments.
5. Cancellation and Refund Policy
Cancellation requests must be submitted in writing at least 7 days before the service start date. For projects already in progress, billing is based on the proportion of completed work. No refunds are issued for software and infrastructure components specifically developed within the project scope.