Score is a workload specification designed for the moment in a developer’s day when they ask “what’s the smallest thing I can write that gets my service deployed, locally and in prod, without learning Kubernetes?” The answer Score proposes: write one score.yaml. Run score-compose to get a docker-compose.yaml. Run score-k8s (or score-helm) to get Kubernetes manifests. The platform team owns the converters and the environment-specific resource provisioners; the developer owns the spec. This article covers the model, the converter pattern, and where Score fits alongside Helm, Kustomize, and an internal developer portal.
How to verify
score-compose --version
score-k8s --version
score-compose generate score.yaml -o compose.yaml
docker compose -f compose.yaml up
score-k8s generate score.yaml -o manifests.yaml
kubectl apply -f manifests.yaml --dry-run=server
generate is the workhorse — it reads the spec, resolves any environment-specific resources via provisioners, and emits the target-format output. If the output is wrong, run --debug to see the resource resolution trace.
What’s happening
A Score spec describes a workload in three sections: containers (the runnable image and command), resources (dependencies the workload needs — a database, a queue, a DNS hostname), and service (the ports the workload exposes). The spec does not say how those resources should be created or wired up; it only declares that they’re needed.
The conversion is where the magic (and the work) happens. A converter like score-compose reads the spec, looks at a local provisioner config (.score-compose/provisioners.yaml), and decides: “you asked for a postgres resource, in compose I’ll add a postgres:15 service, wire up DATABASE_URL from its credentials, and inject it into your container’s env.” score-k8s does the same against a Kubernetes-shaped provisioner library — your “postgres” might map to a CrunchyData PostgresCluster CRD in prod, or a stateful Deployment+PVC in dev.
The split:
- Developer writes
score.yaml. Same file everywhere. Knows nothing about which database operator, which secret store, which ingress class is in use. - Platform team writes the provisioners. A YAML library that says “when a workload asks for
postgres, here’s how I produce that in compose, and here’s how in k8s, and here’s how in k8s-prod-eu-west, and here’s how in k8s-staging-us-east.”
The result: a developer can score-compose generate && docker compose up on their laptop, and score-k8s generate && kubectl apply in CI, with the same spec producing the right shape in both environments.
The procedure
-
Install. Two binaries:
brew install score-spec/tap/score-compose brew install score-spec/tap/score-k8s -
Write a Score spec in
score.yaml:apiVersion: score.dev/v1b1 metadata: name: payments-api containers: web: image: acme/payments-api:1.42.3 variables: DATABASE_URL: postgresql://${resources.db.username}:${resources.db.password}@${resources.db.host}:5432/${resources.db.name} REDIS_URL: redis://${resources.cache.host}:6379 resources: requests: { cpu: 100m, memory: 256Mi } limits: { memory: 512Mi } service: ports: web: port: 8080 targetPort: 8080 resources: db: type: postgres cache: type: redis dns: type: dns params: { hostname: payments-api.acme.example } -
Compose for local dev. With no provisioner config,
score-composeuses its defaults —postgres:15andredis:7images:score-compose init score-compose generate score.yaml -o compose.yaml --build web=. docker compose -f compose.yaml up --buildThe
--build web=.flag tells score-compose to add abuild: .for thewebcontainer so local edits are picked up. -
Kubernetes for prod. The platform team ships a provisioner library:
# .score-k8s/provisioners.yaml - uri: template://postgres type: postgres state: | host: postgres-{{ .Id }}.databases.svc.cluster.local username: {{ .Id }} password: {{ randAlphaNum 20 }} name: {{ .Id }} manifests: | - apiVersion: postgresql.cnpg.io/v1 kind: Cluster metadata: name: postgres-{{ .Id }} namespace: databases spec: instances: 3 bootstrap: initdb: database: {{ .Id }} owner: {{ .Id }}Now
score-k8s generate score.yamlproduces a Deployment forpayments-apiplus aClusterCRD for the Postgres operator to consume. -
Per-env provisioners. Different
provisioners.yamlper environment directory; the platform team can swap thepostgresresource to point at AWS RDS in prod, in-cluster Postgres in staging, and Docker compose in local. -
Integrate with CI. The CI pipeline runs
score-k8s generateand applies the output:- run: score-k8s generate score.yaml --output manifests.yaml - run: kubectl apply -f manifests.yaml --namespace=${{ env.ENVIRONMENT }} -
Catalog integration. If you run Backstage (see /en/knowledge-base/backstage-software-catalog/), the Component’s
catalog-info.yamlcan reference thescore.yamlas its workload definition. Scaffolder templates can generate fresh Score specs for new services.
Operational notes
- Score is spec-only. No reconciler, no controller. The conversion happens at CI time; what runs in the cluster is plain Kubernetes manifests.
score-specis the shared package that powers both converters. Internal converters for niche targets (Nomad, GKE Autopilot variants, an internal scheduler) are possible — write a new converter binary that consumes the shared library.- Provisioners are the platform’s product. Once they’re solid, every developer benefits; until they are, every workload writes one-off escape hatches.
- Score does not own runtime. Once
kubectl applyhappens, Score is out of the picture. Drift, scaling, secret rotation — all handled by your existing Kubernetes stack. - It’s complementary to Helm and Kustomize. Score generates the same kinds of YAML those tools manipulate; you can pass the output through Kustomize for further patching.
Common pitfalls
- Provisioner sprawl. Every new resource type means a new provisioner per environment. Pick a small vocabulary (postgres, redis, queue, dns, blob, http-route) and keep it small.
- Spec drift between local and prod. If the same
score.yamlproduces a single-replica unscaled deployment locally and a 6-replica HPA-managed Deployment in prod, that’s by design — but the platform team must own the difference and document it. resources.db.passwordbaked into compose output. Compose has no native secret store; the password is in the file. Don’t commit generatedcompose.yaml.- Trying to use Score for stateful complex apps. Score is sized for “stateless container + a few resource dependencies.” A multi-component app with sidecars, init containers, and custom scheduling is better expressed in raw Helm.
- Skipping the platform investment. Without provisioners,
score-k8sfalls back to default templates that won’t match your real environment. Adoption stalls at “demo.”
We use Score on engagements where the platform-team-to-developer ratio is favorable enough to invest in provisioners — typically when the same handful of workload shapes recur and the platform team wants to abstract the per-environment differences. The provisioner library, the converter integration in CI, and the integration with the Backstage catalog are pieces we deliver and operate as part of /en/services/managed-operations/. For organizations evaluating multiple workload-spec approaches, the OAM model at /en/knowledge-base/oam-open-application-model-overview/ is the close cousin worth comparing.