---
id: ingress-controllers-nginx-ingress-canary
name: "NGINX Ingress canary traffic splitting"
description: "Installs NGINX Ingress controller with stable+canary Ingresses (canary-weight=20), deploys a canary backend with distinctive response, verifies ~20% of 100 probes hit canary."
labels: {customer: any, profile: ingress}
cluster:
  provider: kind
  k8s_version: v1.36.1
  preinstall:
    - kind: helm
      chart: ingress-nginx/ingress-nginx
      version: "4.10.0"
      release: ingress-nginx
      namespace: ingress-nginx
      repo:
        name: ingress-nginx
        url: "https://kubernetes.github.io/ingress-nginx"
      values:
        controller:
          service:
            type: NodePort
          allowSnippetAnnotations: true
          ingressClassResource:
            name: nginx
            enabled: true
            default: false
            controllerValue: "k8s.io/ingress-nginx"
          watchIngressWithoutClass: true
        admissionWebhooks:
          enabled: false
      wait: pods-ready
      wait_timeout: 3m
    - kind: raw_manifest
      path: chart-test/fixtures/ingress-controllers/nginx-canary-stable-ingress.yaml
      namespace: sample
    - kind: raw_manifest
      path: chart-test/fixtures/ingress-controllers/nginx-canary-deployment.yaml
      namespace: sample
product:
  chart: ./chart
  release: sample
  namespace: sample
  set:
    image.repository: "public.ecr.aws/nginx/nginx"
    image.tag: "1.27-alpine"
    ingress.enabled: "false"
asserts:
  - type: helm-status-deployed
    release: sample
    namespace: sample
  - type: pods-ready
    namespace: sample
    timeout: 5m
  - type: pods-ready
    namespace: ingress-nginx
    timeout: 3m
    selector: app.kubernetes.io/instance=ingress-nginx
  - type: smoke-script
    path: chart-test/assertions/nginx-canary.sh
tags: [nightly]
mechanisms: ['addon:nginx-ingress']
category: networking
integration: nginx-ingress
tier: live
