Skills2026年4月11日·1 分钟阅读

HashiCorp Nomad — Flexible Workload Orchestrator

Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy containers, VMs, Java apps, and binaries on bare metal. Smaller and simpler than Kubernetes with native Consul and Vault integration.

Agent 就绪

先审查再安装

这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Community
入口
step-1.md
先审查命令
npx -y tokrepo@latest install a2aa9c27-35f3-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run,确认写入项后再运行此命令。

TL;DR
Nomad orchestrates containers, VMs, and binaries with a simpler model than Kubernetes.
§01

What it is

HashiCorp Nomad is a flexible workload orchestrator that deploys and manages containers, virtual machines, Java applications, and standalone binaries across on-prem and cloud infrastructure. Unlike Kubernetes, Nomad handles non-containerized workloads natively and operates as a single binary with no external dependencies.

The tool targets platform teams and DevOps engineers who need orchestration for mixed workloads -- not just containers -- without the operational complexity of Kubernetes.

§02

How it saves time or tokens

Nomad uses a simple job specification format (HCL) that is shorter and easier to learn than Kubernetes YAML manifests. A basic deployment requires a single job file rather than separate Deployment, Service, ConfigMap, and Ingress resources. The single-binary architecture means no etcd, no API server, and no control plane components to manage.

§03

How to use

  1. Install Nomad: brew install nomad or download the binary from HashiCorp releases.
  2. Start a dev agent: nomad agent -dev for local testing.
  3. Write a job file and deploy: nomad job run my-app.nomad.hcl.
§04

Example

# my-app.nomad.hcl
job 'web-api' {
  datacenters = ['dc1']
  type = 'service'

  group 'api' {
    count = 3

    network {
      port 'http' { to = 8080 }
    }

    task 'server' {
      driver = 'docker'
      config {
        image = 'my-api:latest'
        ports = ['http']
      }
      resources {
        cpu    = 500
        memory = 256
      }
    }
  }
}
§05

Related on TokRepo

§06

Common pitfalls

  • Nomad does not include a service mesh by default. Pair it with Consul for service discovery and Vault for secrets management.
  • The community edition uses the BSL license since 2023. Check license compatibility for your use case before adopting.
  • Nomad's ecosystem is smaller than Kubernetes. Fewer third-party integrations and Helm-style package managers are available.

常见问题

When should I choose Nomad over Kubernetes?+

Choose Nomad when you need to orchestrate mixed workloads (containers + VMs + binaries), want simpler operations with a single binary, or have a smaller team that cannot justify the Kubernetes learning curve. Kubernetes is better for large container-only deployments with a rich ecosystem.

Does Nomad support Docker containers?+

Yes. Nomad has a built-in Docker task driver that pulls and runs container images. It also supports Podman, containerd, Java, QEMU, and raw exec drivers for non-containerized workloads.

How does Nomad handle scaling?+

Nomad supports manual scaling via the count parameter and automatic scaling through the Nomad Autoscaler. It can scale based on CPU, memory, or custom metrics from Prometheus or Datadog.

Is Nomad still free to use?+

The community edition is available under the Business Source License (BSL). It is free for most use cases but has restrictions for competing products. HashiCorp also offers an Enterprise edition with additional features.

Does Nomad integrate with Terraform?+

Yes. HashiCorp provides a Terraform provider for Nomad that lets you manage jobs, namespaces, and ACL policies as infrastructure code. This fits naturally into existing HashiCorp workflows.

引用来源 (3)

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产