You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are going to view the application traces in AWS X-Ray.
We need XRay Daemon running as Daemonset for that.
# Verify alb-ingress-controller pod running in namespace kube-system
kubectl get pods -n kube-system
# Verify external-dns & xray-daemon pod running in default namespace
kubectl get pods
Step-03: Review Deployment Manifest for V2 Notification Service
We are going to distribute 50% traffic to each of the V1 and V2 version of application
NS V1 Replicas
NS V2 Replicas
Traffic Distribution
2
2
50% traffic to NS V2 Version
08-V2-NotificationMicroservice-Deployment.yml
# Change-1: Image Tag is 4.0.0-AWS-XRayspec:
containers:
- name: notification-serviceimage: stacksimplify/kube-notifications-microservice:4.0.0-AWS-XRay# Change-2: New Environment Variables related to AWS X-Ray
- name: AWS_XRAY_TRACING_NAME value: "V2-Notification-Microservice"
- name: AWS_XRAY_DAEMON_ADDRESSvalue: "xray-service.default:2000"
- name: AWS_XRAY_CONTEXT_MISSING value: "LOG_ERROR"# Log an error and continue, Ideally RUNTIME_ERROR – Throw a runtime exception which is default option if not configured
Step-04: Review Ingress Manifest
07-ALB-Ingress-SSL-Redirect-ExternalDNS.yml
# Change-1-For-You: Update with your SSL Cert ARN when using templatealb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-east-1:180789647333:certificate/9f042b5d-86fd-4fad-96d0-c81c5abc71e1# Change-2-For-You: Update with your "yourdomainname.com"# External DNS - For creating a Record Set in Route53external-dns.alpha.kubernetes.io/hostname: canarydemo.kubeoncloud.com
# Test
https://canarydemo.kubeoncloud.com/usermgmt/notification-xray
# Your Domain Name
https://<Replace-your-domain-name>/usermgmt/notification-xray
Step-07: What is happening in the background?
As far as Notification Cluster IP Service selector label matches to Notificaiton V1 and V2 Deployment manifests selector.matchLables those respective pods are picked to send traffic.
# Notification Cluster IP Service - Selector Labelselector:
app: notification-restapp# Notification V1 and V2 Deployment - Selector Match Labelsselector:
matchLabels:
app: notification-restapp
Step-08: Clean-Up
We are going to delete applications created as part of this section