Deploying with Spinnaker
Continuous delivery platform for deploying to multiple clouds with advanced deployment strategies.
CI/CDAdvanced
Why
Spinnaker abstracts cloud deployments across AWS, GCP, Azure, and Kubernetes with built-in canary, blue-green, and rolling strategies. DORA's 2024 State of DevOps report shows elite teams deploy 973x more frequently than low performers.
CI/CD pipelines with automated testing reduce change failure rate to 5-15% versus 40-60% for manual deployments.
When
Multi-cloud enterprise deployments needing sophisticated deployment strategies and pipeline orchestration. Avoid complex pipeline orchestration for repos with fewer than 5 contributors — a pre-commit hook + GitHub Actions suffices.
Skip self-hosted runners unless you need GPU or VPN access.
How
# Install Spinnaker via Halyard
hal config provider kubernetes enable
hal config provider kubernetes account add my-k8s --context-version 1.28 --kubeconfig-file ~/.kube/config
hal config provider aws account add my-aws --access-key-id $AWS_KEY --secret-access-key $AWS_SECRET
hal config deploy edit --type distributed
hal deploy apply
# Define a pipeline in JSON or via Deck UI
# Pipeline stages: Bake → Deploy → Manual Judgment → Canary → Enable Traffic
4. Verify deployment — curl -I https://your-app.example.com
5. Monitor logs — check for errors in first 5 minutes
6. Rollback if needed — revert to previous version
Example
# Spinnaker pipeline JSON (excerpt)
{
"name": "deploy-to-prod",
"stages": [
{ "type": "bake", "name": "Build Image", "refId": "1" },
{ "type": "deploy", "name": "Deploy to Cluster",
"refId": "2", "requisiteStageRefIds": ["1"],
"clusters": [{ "account": "my-k8s", "application": "myapp" }] },
{ "type": "canary", "name": "Canary Analysis",
"refId": "3", "requisiteStageRefIds": ["2"] }
]
}
Common Problems
- ⚠Halyard config errors — run hal deploy connect to validate
- ⚠Canary metrics not flowing — check Kayenta integration with Prometheus/Datadog
- ⚠Configuration drift between environments — use infrastructure-as-code (Terraform/Pulumi) to keep dev/staging/prod identical
Best Practices
- ✓Use managed pipeline templates — standardize deployment patterns
- ✓Integrate Kayenta for automated canary analysis — reduce manual judgment
- ✓Set up health checks and graceful shutdown — handle SIGTERM to drain in-flight requests before exit