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.
-
Create a Kubernetes cluster of the latest version, if not done so already.
-
Connect to the cluster using
kubectl. -
Create a test application:
-
Create a new namespace for the project:
kubectl create ns echo-production -
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 -
-
Create a manifest file
http-svc.ingresswith the following contents: -
Apply the manifest in the cluster:
kubectl apply -f http-svc.ingress -n echo-productionAs a result, an application will be created and the server will respond to all requests from
echo.com.
-
Create a Canary version of the namespace for the application:
kubectl create ns echo-canary -
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 -
Create a Canary version of the Ingress configuration file:
-
Apply the manifest in the cluster:
kubectl apply -f http-svc.ingress.canary -n echo-canary
A running cluster consumes computing resources and is charged accordingly. If you created it for testing purposes and no longer need it: