VK Cloud logo

Configuring Canary Deployment Ingress

This article will help you deploy a Kubernetes cluster and configure Canary Deployment on it using Nginx Ingress Annotations: execute the Canary Deployment script for the echo server and make sure that traffic is distributed according to the configuration file.

Before you begin

  1. Create a Kubernetes cluster of the latest version, if not done so already.

  2. Connect to the cluster using kubectl.

  3. Create a test application:

    1. Create a new namespace for the project:

      kubectl create ns echo-production
    2. Create a Kubernetes resource based on the manifest, for example, http-svc:

    kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/http-svc.yaml -n echo-production

1. Create an Ingress resource

  1. Create a manifest file http-svc.ingress with the following contents:

  2. Apply the manifest in the cluster:

    kubectl apply -f http-svc.ingress -n echo-production

    As a result, an application will be created and the server will respond to all requests from echo.com.

2. Create a copy of the deployed application

  1. Create a Canary version of the namespace for the application:

    kubectl create ns echo-canary
  2. Deploy the Canary version of the app:

    kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/docs/examples/http-svc.yaml -n echo-canary
  3. Create a Canary version of the Ingress configuration file:

  4. Apply the manifest in the cluster:

    kubectl apply -f http-svc.ingress.canary -n echo-canary

Delete unused resources

A running cluster consumes computing resources and is charged accordingly. If you created it for testing purposes and no longer need it:

Was this article helpful?