1. Deploy the quarkus helm chart on AWS EKS


    To deploy a Quarkus Helm chart on AWS EKS using Pulumi, you need to follow a few steps:

    1. Create an EKS cluster.
    2. Deploy the Helm chart into the EKS cluster.

    Pulumi provides abstracted resources to handle AWS EKS directly through the @pulumi/eks package, which simplifies the process of creating an Amazon EKS cluster. We will use the Cluster resource from this package to create our Kubernetes cluster.

    For deploying the Helm chart, Pulumi's @pulumi/kubernetes package provides an abstract way to deploy charts with the Chart resource from the Helm package.

    The following program in TypeScript will create an EKS cluster and then deploy the Quarkus Helm chart onto that cluster. Make sure to install the required Pulumi packages using npm before running the Pulumi program:

    npm install @pulumi/eks @pulumi/kubernetes @pulumi/aws @pulumi/pulumi

    Below is a Pulumi program in TypeScript that accomplishes the deployment:

    import * as eks from "@pulumi/eks"; import * as k8s from "@pulumi/kubernetes"; import * as pulumi from "@pulumi/pulumi"; // Create an EKS cluster. The cluster will provide its kubeconfig and the default Kubernetes provider. const cluster = new eks.Cluster("my-cluster", { desiredCapacity: 2, // set the desired number of cluster nodes minSize: 1, maxSize: 2, }); // A Kubernetes provider is necessary to deploy resources to the provisioned cluster. const provider = new k8s.Provider("k8s-provider", { kubeconfig: cluster.kubeconfig.apply(JSON.stringify), }); // Deploy the Quarkus Helm chart in the created EKS cluster. const quarkusHelmChart = new k8s.helm.v3.Chart("quarkus-helm-chart", { // You will need to specify the correct chart name and repository chart: "quarkus", // version: "<CHART_VERSION>", You can specify the chart version you want to deploy repo: "<HELM_REPO>", // replace with the Helm repository that hosts the Quarkus chart }, { provider }); // Export the cluster's kubeconfig and Quarkus service endpoint. export const kubeconfig = cluster.kubeconfig; export const quarkusChartDeploymentName = quarkusHelmChart.getResourceName("v1/Service", "quarkus"); // Once you run pulumi up and create the resources, you will receive the output of kubeconfig which you can use // to interact with your cluster using the kubectl CLI and the service endpoint name for your Quarkus deployment.

    Please make the following replacements before running the code:

    • Replace <HELM_REPO> with the URL of the Helm chart repository that contains the Quarkus chart.
    • Optionally, specify the version of the chart you want to deploy by uncommenting and setting the version key in the quarkusHelmChart resource properties.

    This program defines an EKS cluster and then instantiates a Helm chart for Quarkus within the Kubernetes cluster that EKS provides. The kubeconfig is exported so that you can interact with your cluster via kubectl if necessary, and the name of the deployed service is also exported for easy reference.

    After writing this program in a .ts file, use the pulumi up command to provision the resources. By default, the Pulumi program will look for the associated Pulumi project and stack configuration to determine where (which cloud and region) to deploy the resources. Ensure you have the AWS credentials configured so that Pulumi can interact with your AWS account.