Deploy X-Ray DaemonSet

Now that we have modified the IAM role for the worker nodes to permit write operations to the X-Ray service, we are going to deploy the X-Ray DaemonSet to the EKS cluster. The X-Ray daemon will be deployed to each worker node in the EKS cluster. For reference, see the example implementation used in this module.

The AWS X-Ray SDKs are used to instrument your microservices. When using the DaemonSet in the example implementation, you need to configure it to point to xray-service.default:2000.

The following showcases how to configure the X-Ray SDK for Go. This is merely an example and not a required step in the workshop.

func init() {
	xray.Configure(xray.Config{
		DaemonAddr:     "xray-service.default:2000",
		LogLevel:       "info",
	})
}

To deploy the X-Ray DaemonSet:

kubectl create -f https://eksworkshop.com/x-ray/daemonset.files/xray-k8s-daemonset.yaml

To see the status of the X-Ray DaemonSet:

kubectl describe daemonset xray-daemon

The folllowing is an example of the command output:

GitHub Edit

To view the logs for all of the X-Ray daemon pods run the following

kubectl logs -l app=xray-daemon