Prompt

How do I set up a canary deployment in Kubernetes?

Technology / CI/CD & DevOps1 observationLast seen Oct 19, 2026

Latest observation

Oct 19, 2026OpenAI APIWeb search: off

A canary deployment in Kubernetes means rolling out a new version to a small subset of traffic first, then gradually increasing it if it looks healthy.

Common ways to do it

  1. Manual canary with two Deployments + Service selector
  2. Traffic-splitting with a service mesh or ingress
  3. Use a progressive delivery tool like Argo Rollouts or Flagger

1) Simple canary with two Deployments

You run:

  • app-stable for the current version
  • app-canary for the new version

Then you route a small portion of traffic to canary by:

  • using a separate Service
  • or adjusting labels/selectors manually
  • or using an ingress/controller that supports weighted routing

Example

apiVersion: apps/v1
kind: Deployment
metadata:
  name: myapp-stable
spec:
  replicas: 9
  selector:
    matchLabels:
      app: myapp
      version: stable
  template:
    metadata:
      labels:
        app: myapp
        version: stable
    spec:
      containers:
      - name: myapp
        image: myrepo/myapp:1.0.0
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: myapp-canary
spec:
  replicas: 1
  selector:
    matchLabels:
      app: myapp
      version: canary
  template:
    metadata:
      labels:
        app: myapp
        version: canary
    spec:
      containers:
      - name: myapp
        image: myrepo/myapp:1.1.0

A Service can target both, but Kubernetes Services don’t do weighted routing by default, so you usually need another component for that.


2) Canary with Argo Rollouts

This is the easiest “real” canary setup in Kubernetes.

Benefits

  • Automated traffic shifting
  • Analysis/metrics-based promotion
  • Easy rollback
  • Integrates with NGINX, ALB, Istio, etc.

Example Rollout

apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: myapp
spec:
  replicas: 10
  strategy:
    canary:
      steps:
      - setWeight: 10
      - pause: {duration: 2m}
      - setWeight: 50
      - pause: {duration: 5m}
      - setWeight: 100
  selector:
    matchLabels:
      app: myapp
  template:
    metadata:
      labels:
        app: myapp
    spec:
      containers:
      - name: myapp
        image: myrepo/myapp:1.1.0

You’ll also need a Service and an ingress/controller or mesh integration depending on how traffic is routed.


3) Canary with service mesh / ingress

If you use:

  • Istio
  • Linkerd
  • NGINX Ingress
  • Traefik
  • AWS ALB

you can often configure weighted traffic splitting.

Example with Istio VirtualService

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: myapp
spec:
  hosts:
  - myapp.example.com
  http:
  - route:
    - destination:
        host: myapp
        subset: stable
      weight: 90
    - destination:
        host: myapp
        subset: canary
      weight: 10

This lets you send 10% of traffic to canary, then increase later.


Recommended setup

If you want a robust production canary deployment:

  • Use Argo Rollouts
  • Add metrics-based analysis (Prometheus, Datadog, New Relic, etc.)
  • Start with 5–10% traffic
  • Increase in steps
  • Auto-rollback on errors/latency regression

Best practices

  • Keep stable and canary versions isolated
  • Use readiness/liveness probes
  • Monitor:
    • error rate
    • latency
    • CPU/memory
    • business KPIs
  • Use automated rollback thresholds
  • Prefer gradual traffic shifts over replica-only splitting
  • Test in staging first

If you want, I can give you:

  1. a full Argo Rollouts example,
  2. an Istio canary example, or
  3. a plain Kubernetes + NGINX Ingress setup.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.