1. Deploy the druid-http-gateway helm chart on AWS EKS


    To deploy the druid-http-gateway Helm chart on an AWS EKS cluster, we will follow these steps:

    1. Set up AWS EKS Cluster: Using aws.eks.Cluster which creates and manages an Amazon EKS cluster.
    2. Deploy Helm Chart on EKS: Utilizing kubernetes.helm.v3.Chart which is a resource for deploying Helm charts in a Kubernetes cluster.

    Here's a Pulumi program written in TypeScript to achieve this task:

    Step 1: Set Up the EKS Cluster

    First, we need to create an EKS cluster. You need to ensure you have the necessary IAM roles for the EKS and the Node Groups before you proceed with this. Details can be found in the EKS Cluster documentation.

    Step 2: Deploy the Helm Chart

    Once the EKS cluster is created, we can deploy the druid-http-gateway Helm chart into the cluster. The chart should be available in a Helm repository or a defined location. For this example, let's assume the chart is available in a Helm repo, and we'll specify the version we want to deploy.

    Here is the complete Pulumi program:

    import * as aws from "@pulumi/aws"; import * as awsx from "@pulumi/awsx"; import * as eks from "@pulumi/eks"; import * as k8s from "@pulumi/kubernetes"; // Create an EKS cluster with the default configuration. const cluster = new eks.Cluster("my-eks-cluster", {}); // Export the cluster's kubeconfig. export const kubeconfig = cluster.kubeconfig; // Deploy the druid-http-gateway Helm chart into the EKS cluster. // The repository URL where the Helm chart is located should be specified or it should be added to the // Helm repositories in the local machine where Pulumi is run. const chart = new k8s.helm.v3.Chart("druid-http-gateway", { chart: "druid-http-gateway", version: "x.y.z", // replace "x.y.z" with the actual chart version you intend to deploy fetchOpts: { repo: "https://helm-repo-url/druid-http-gateway" // replace with the actual Helm repo URL }, }, { provider: cluster.provider }); // The following outputs can be used to access your EKS Cluster and Helm chart. export const clusterName = cluster.eksCluster.name; export const chartName = chart.release.name;

    In this program:

    • We import the required Pulumi packages for AWS (@pulumi/aws), AWS extensions (@pulumi/awsx), EKS (@pulumi/eks), and Kubernetes (@pulumi/kubernetes).
    • We instantiate an EKS cluster with the default configuration using new eks.Cluster("my-eks-cluster", {}). This includes creating the necessary VPC, subnets, and node groups. If you require a custom configuration, you can also specify properties like node instance types, desired capacity of nodes, etc.
    • We define a new Helm chart resource, specifying the chart name druid-http-gateway, the version, and the repository. Make sure that you replace the placeholders in the program like x.y.z and the Helm repo URL with the actual values.
    • We use the EKS provider instance for this Helm chart to ensure that it is deployed into the correct cluster.
    • Finally, we export the kubeconfig to allow access to the cluster using kubectl or other Kubernetes tooling, and we also export the cluster and chart names for further references.

    After writing this program, you can run pulumi up to execute it, and assuming you have set up AWS correctly, Pulumi will handle the provisioning and deployment process.