Quickstart
Install the Kubestead controller and deploy your first canary rollout. Estimated time: 10 minutes.
Quickstart Guide
Step 1: Add the Helm Repository
helm repo add kubestead https://charts.kubestead.com
helm repo update
Step 2: Install the Controller
helm install kubestead-controller kubestead/controller \
--namespace kubestead-system \
--create-namespace \
--set metrics.prometheus.address=http://prometheus.monitoring:9090
The controller will be ready within 30 seconds. Verify:
kubectl get pods -n kubestead-system
# NAME READY STATUS RESTARTS
# kubestead-controller-7d9f5b4c8-xk2pq 1/1 Running 0
Step 3: Create Your First Rollout
Replace your existing Deployment with a Rollout resource. Save as rollout.yaml:
apiVersion: kubestead.io/v1alpha1
kind: Rollout
metadata:
name: my-service
spec:
replicas: 5
selector:
matchLabels:
app: my-service
template:
metadata:
labels:
app: my-service
spec:
containers:
- name: my-service
image: my-service:v2.0.0
strategy: canary
canarySteps:
- setWeight: 5
- pause: {duration: 2m}
- setWeight: 12
- pause: {duration: 5m}
analysisTemplate:
name: error-rate-analysis
rollbackPolicy:
autoRollback: true
maxRollbackDuration: 90s
kubectl apply -f rollout.yaml
Step 4: Watch the Rollout
kubectl kbs rollout status my-service
# Rollout: my-service
# Status: Progressing
# Step: 2/4 (setWeight: 12%)
# Canary: 1/5 pods
# Analysis: PASS (error-rate: 0.12% < 0.30%)
# Elapsed: 4m32s
Next Steps
- Read the Rollout Spec reference for all configuration options.
- Set up Canary Analysis templates for your Prometheus queries.
- Configure the REST API for CI/CD integration.