1. Deploy the project-origin-wallet helm chart on AWS EKS


    To deploy the project-origin-wallet Helm chart on AWS EKS, you will carry out the following general steps:

    1. Create an EKS cluster using the EKS package.
    2. Deploy the Helm chart onto the cluster using the Helm chart resource from the Kubernetes package.

    Below is a detailed Pulumi program that carries out these steps:

    Step 1: Setup EKS Cluster

    You need to setup an EKS cluster first. This involves creating an instance of eks.Cluster, which under the hood will take care of setting up all the necessary AWS infrastructure, including the VPC, subnets, and the EKS control plane.

    import * as eks from "@pulumi/eks"; // Create an EKS cluster with the default configuration const cluster = new eks.Cluster("my-cluster", {});

    In the code above, my-cluster is the name of the EKS cluster. You can customize this cluster by passing additional arguments to the eks.Cluster class. If not specified, it will choose sensible defaults for the VPC and node configuration.

    Step 2: Deploy Helm Chart

    Next, you will deploy the project-origin-wallet Helm chart to your new EKS cluster. The kubernetes.helm.v3.Chart class from the Kubernetes package takes care of deploying Helm charts.

    Before deploying, you would typically retrieve or build the Docker image for your application and push it to a registry that your Kubernetes cluster can access. Since project-origin-wallet is likely a third-party chart, it should reference images that are hosted in a public or private repository.

    import * as k8s from "@pulumi/kubernetes"; // Deploy the project-origin-wallet helm chart const projectOriginWalletChart = new k8s.helm.v3.Chart("project-origin-wallet-chart", { chart: "project-origin-wallet", // Assuming 'project-origin-wallet' is located in a Helm repo added to your Helm CLI // If this is a custom Helm chart, you might use `path` to specify its directory. version: "1.0.0", // Use the appropriate chart version fetchOpts: { repo: "https://charts.example.com/", // Replace with the chart's repository URL }, }, { provider: cluster.provider });

    In this block, replace "https://charts.example.com/" with the URL of the Helm repository that contains the project-origin-wallet chart. Also, make sure to use the correct version of the chart.

    Full TypeScript Program

    Here's the full TypeScript Pulumi program that combines the cluster creation and deployment steps:

    import * as pulumi from "@pulumi/pulumi"; import * as eks from "@pulumi/eks"; import * as k8s from "@pulumi/kubernetes"; // Create an EKS cluster. const cluster = new eks.Cluster("my-cluster", {}); // Deploy the Helm chart to the EKS cluster. const projectOriginWalletChart = new k8s.helm.v3.Chart("project-origin-wallet-chart", { chart: "project-origin-wallet", version: "1.0.0", // Specify the chart version fetchOpts: { repo: "https://charts.example.com/", // Replace with the actual Helm repo URL }, }, { provider: cluster.provider }); // Export the cluster's kubeconfig. export const kubeconfig = cluster.kubeconfig;

    Running the program

    After writing this Pulumi code into a file (e.g., index.ts), you need to run pulumi up in the CLI, which will provision the resources as defined in your code.


    • Before running the code, ensure Pulumi CLI is installed and configured with appropriate AWS credentials.
    • This code assumes that the Helm repository and the chart version are correctly specified.
    • The EKS cluster might take several minutes to provision. Once it's ready, the Helm chart will be deployed.
    • You can obtain kubeconfig from the Pulumi stack outputs to interact with your cluster using kubectl.