1. Deploy the zipkin-stackdriver-proxy helm chart on AWS EKS

    TypeScript

    To deploy the zipkin-stackdriver-proxy Helm chart on AWS EKS using Pulumi, we need to go through several steps.

    1. We need to create an EKS cluster using the aws.eks.Cluster resource.
    2. After the cluster is created, we configure our Pulumi program to use the cluster's kubeconfig.
    3. Finally, we use the kubernetes.helm.v3.Chart resource to deploy the zipkin-stackdriver-proxy Helm chart to our EKS cluster.

    Below is a program that performs these steps. The Pulumi EKS package simplifies this task by managing the provisioning of the cluster, node groups, and the necessary AWS resources like IAM roles and VPC configuration.

    First, we'll create an EKS cluster:

    import * as awsx from "@pulumi/awsx"; import * as eks from "@pulumi/eks"; import * as k8s from "@pulumi/kubernetes"; // Create a VPC for our cluster. const vpc = new awsx.ec2.Vpc("zipkin-vpc", { numberOfAvailabilityZones: 2 }); // Create an EKS cluster with the default configuration. const cluster = new eks.Cluster("zipkin-cluster", { vpcId: vpc.id, subnetIds: vpc.publicSubnetIds, instanceType: "t2.medium", desiredCapacity: 2, // Desired count of cluster nodes. minSize: 1, maxSize: 3, // If you want to add your own custom tags to the EKS Cluster, uncomment below: // tags: { // Name: "Pulumi-EKS-Zipkin", // }, }); // Export the cluster's kubeconfig. export const kubeconfig = cluster.kubeconfig;

    Next, we'll deploy the zipkin-stackdriver-proxy Helm chart:

    // Create a Kubernetes provider instance that uses our EKS cluster from above. const clusterProvider = new k8s.Provider("cluster-provider", { kubeconfig: cluster.kubeconfig.apply(JSON.stringify), }); // Deploy the zipkin-stackdriver-proxy Helm chart. const zipkinChart = new k8s.helm.v3.Chart("zipkin-stackdriver-proxy", { chart: "zipkin-stackdriver-proxy", version: "1.0.0", // specify the version you want to deploy fetchOpts: { repo: "http://helm-repo-url/", // Replace with the actual Helm chart repository URL }, }, { provider: clusterProvider }); // Export any information that can be useful or necessary to access later. // For example, a Helm chart might provide an endpoint to access its service: // export const zipkinEndpoint = zipkinChart.getResourceProperty("v1/Service", "zipkin-stackdriver-proxy", "status").apply(s => `http://${s.loadBalancer.ingress[0].hostname}`);

    Please make sure to replace "http://helm-repo-url/" with the actual repository URL where the zipkin-stackdriver-proxy Helm chart is hosted.

    This Pulumi program will start by creating the necessary AWS resources required to run an EKS cluster including the VPC, subnets, and the EKS cluster itself. It will then deploy the Helm chart to the Kubernetes cluster configured to interface with Stackdriver.

    Before you can deploy this program, you will need to install Pulumi and configure your AWS credentials. Make sure you've got kubectl installed, as it's necessary for working with Kubernetes clusters.

    To run the Pulumi program, you can use the following commands in your terminal:

    pulumi up # To preview and deploy changes

    After confirming the deployment, Pulumi will do the heavy lifting of provisioning the resources and deploying the Helm chart. Once it's done, you should have a running instance of the Zipkin Stackdriver Proxy in your new EKS cluster.