keepcalculator

06 Numbers and Powers

Nomad vs Kubernetes: Choosing a Scheduler

Card No. 06·32100 · Updated · Standard formula, shown below

Nomad and Kubernetes are both container orchestrators, but they answer different questions: Kubernetes is a full application platform with a scheduler at its core, while Nomad is a focused cluster scheduler that can run containers, VMs, and standalone binaries. If you need a self-contained platform with built-in service discovery, scaling, and a large ecosystem, choose Kubernetes; if you want a simpler, more flexible scheduler that integrates with your existing stack, choose Nomad.

Background: The Two Projects

Kubernetes began as Google’s internal Borg system, open-sourced in 2014. It grew rapidly into the de facto standard for container orchestration, backed by the Cloud Native Computing Foundation (CNCF). Its architecture is complex but powerful: a control plane (API server, etcd, scheduler, controller managers) manages worker nodes where pods run. Pods are the smallest deployable units, and Kubernetes provides extensive features like auto-scaling, rolling updates, and service meshes.

Nomad was created by HashiCorp, first released in 2015. It is part of the HashiCorp ecosystem (with Consul for service discovery and Vault for secrets). Nomad is a single binary that acts as both server and client, with a simpler architecture. It schedules not only Docker containers but also raw executables, Java applications, and QEMU virtual machines. This makes it appealing for organizations that run a mix of workloads, not just containerized microservices.

How Scheduling Works Differently

Kubernetes scheduling is declarative and based on resource requests. You define a pod’s CPU and memory requirements, and the kube-scheduler places it on a node that has enough available capacity. It considers constraints like node affinity, taints, and tolerations. Once scheduled, the kubelet on the node ensures the pod stays running. Kubernetes also has a controller loop that continuously reconciles the desired state—if a pod dies, it is rescheduled.

Nomad uses a bin-packing algorithm with a priority queue. It evaluates jobs (which can be containers, binaries, or VMs) and places them on clients with available resources. Nomad supports both service jobs (long-running) and batch jobs (short-lived). Its scheduler is optimistic: it does not have a central state store like etcd; instead, it uses a gossip protocol and a distributed consensus (Raft) among servers. This makes Nomad faster to schedule and easier to operate at scale.

Feature Comparison: What You Get Out of the Box

  • Service discovery: Kubernetes has built-in DNS and service abstraction. Nomad relies on Consul for service discovery, which is a separate tool but integrates seamlessly.
  • Scaling: Kubernetes has the Horizontal Pod Autoscaler (HPA) based on CPU/memory or custom metrics. Nomad has a Nomad Autoscaler, but it is less mature and often requires external integrations.
  • Networking: Kubernetes has a rich networking model with services, ingress, and network policies. Nomad uses a simpler network model; you typically use Consul Connect for service-to-service encryption and authorization.
  • Storage: Kubernetes has persistent volumes and storage classes. Nomad has volume support (host volumes, CSI plugins) but it is less granular.
  • Multi-tenancy: Kubernetes has namespaces and RBAC. Nomad has namespaces and ACLs, but the policy model is less granular.
  • Workload types: Kubernetes runs containers (and with KubeVirt, VMs). Nomad runs containers, binaries, Java, and QEMU VMs natively.

Operational Complexity and Learning Curve

Kubernetes is notoriously complex to operate. Setting up a production cluster requires managing etcd, TLS certificates, networking plugins (CNI), and many controllers. The learning curve is steep, and even simple tasks require understanding concepts like deployments, services, and ingress. However, the ecosystem is vast: you can find managed Kubernetes services (EKS, AKS, GKE) that handle much of the operational burden.

Nomad is significantly simpler. A single binary, a few configuration files, and you have a cluster. It is easier to learn and operate, making it a good choice for small teams or organizations that do not need the full Kubernetes feature set. The trade-off is that you may need to assemble your own tooling for service discovery, monitoring, and logging, whereas Kubernetes often has these integrated or as well-known add-ons.

Common Problems and Misconceptions

A common misconception is that Nomad is less production-ready than Kubernetes. In reality, Nomad is used in production by many companies, especially those with mixed workloads or that value simplicity. Another misconception is that Kubernetes is always the best choice because it is the most popular. Popularity brings a larger community, more tutorials, and more third-party tools, but it also brings complexity and a steeper learning curve.

Common problems with Kubernetes include:

  • Version upgrades are complex and can break workloads.
  • Networking and security policies are hard to configure correctly.
  • Resource leaks (orphaned pods, PVCs) can occur if not managed properly.

Common problems with Nomad include:

  • Service discovery and DNS require Consul, adding another component.
  • Autoscaling is less mature; you may need to write custom scripts.
  • The ecosystem is smaller, so fewer pre-built integrations exist.

Cost and Ecosystem Considerations

Both tools are open-source and free to use, but the cost of running them in production includes infrastructure, operational time, and tooling. Kubernetes clusters typically require more resources for the control plane (etcd, API server, etc.) and more nodes to run system components like kube-proxy and DNS. Nomad’s control plane is lighter, so you can run a cluster on fewer, smaller nodes.

The ecosystem matters: Kubernetes has a massive ecosystem of tools (Helm, Prometheus, Istio, etc.) that are often designed specifically for it. Nomad integrates well with HashiCorp tools (Consul, Vault) and can also use many CNCF tools, but sometimes with less polish. If you already use HashiCorp tools, Nomad is a natural fit. If you are starting fresh and want the widest range of options, Kubernetes is the safer bet.

How to Choose: A Practical Guide

There is no one-size-fits-all answer. Consider the following factors:

  1. Workload types: If you run only containers, both work. If you need to run VMs, binaries, or Java apps alongside containers, Nomad is simpler.
  2. Team expertise: If your team already knows Kubernetes, stick with it. If you are new to orchestration, Nomad’s simplicity might get you to production faster.
  3. Operational overhead: Do you have dedicated DevOps staff? Kubernetes demands more attention. Nomad can be managed by a smaller team.
  4. Integration needs: If you rely on Consul and Vault, Nomad integrates deeply. If you need a wide range of third-party integrations, Kubernetes has more.
  5. Future scalability: Kubernetes is more feature-rich and can handle very large, complex deployments. Nomad scales well too, but you may need to add more components as you grow.

In practice, many organizations start with Nomad for simplicity and later migrate to Kubernetes as their needs grow. Others choose Kubernetes from the start because they know they will need its features. There is also a middle path: run Nomad for batch jobs and Kubernetes for long-running services, but that adds operational complexity.

Frequently Asked Questions

Can Nomad run Kubernetes?

No, Nomad is not a Kubernetes distribution. However, you can run Kubernetes on top of Nomad using the Kubernetes on Nomad project (kube-on-nomad), which runs the Kubernetes control plane as a Nomad job. This is an advanced use case and not recommended for production unless you have specific needs.

Which is better for small teams?

Nomad is often better for small teams because it is simpler to operate and requires less infrastructure. A small team can get a Nomad cluster running in a day, whereas a Kubernetes cluster might take a week and ongoing maintenance. However, if the team already has Kubernetes expertise, it can still be efficient.

Is Nomad cheaper than Kubernetes?

Potentially yes, because the control plane is lighter and you need fewer nodes. However, the total cost depends on your workload and the tools you add. If you need Consul and Vault, the cost of those components may offset the savings. In a cloud environment, managed Kubernetes services can reduce operational cost, making the comparison more nuanced.

Can I migrate from Nomad to Kubernetes?

Yes, but it is not trivial. You would need to rewrite your job definitions as Kubernetes manifests, set up service discovery and storage, and adjust your CI/CD pipelines. The migration is easier if you already use standard container images and follow best practices like stateless services.

Does Nomad support Windows workloads?

Yes, Nomad supports Windows clients for Docker containers and raw executables. Kubernetes also supports Windows nodes, but the support is less mature than Linux. If you have a mix of Windows and Linux workloads, Nomad’s ability to run binaries directly might be an advantage.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →