1. Deploy the newrelic-private-minion helm chart on AWS EKS


    Deploying a Helm chart to an Amazon Elastic Kubernetes Service (EKS) cluster involves several steps. First, you'll need to create an EKS cluster if you don't have one already. Then, you'll need to deploy the Helm chart to that cluster. In this case, you want to deploy the newrelic-private-minion Helm chart.

    Below is a Pulumi program written in TypeScript that accomplishes this. It consists of:

    1. Creating an EKS cluster using the awsx.eks.Cluster resource. This abstracts away much of the complexity in setting up an EKS cluster.
    2. Deploying the newrelic-private-minion Helm chart to the EKS cluster using the kubernetes.helm.v3.Chart resource.

    Make sure you have Pulumi installed, AWS CLI configured with appropriate permissions to create resources, and Helm CLI installed for chart deployment if necessary.

    Here's the detailed Pulumi program for the entire setup:

    import * as awsx from "@pulumi/awsx"; import * as kubernetes from "@pulumi/kubernetes"; import * as pulumi from "@pulumi/pulumi"; // Create a VPC for the EKS cluster. const vpc = new awsx.ec2.Vpc("pulumi-vpc", { numberOfAvailabilityZones: 2, }); // Create an EKS cluster with the default configuration. const cluster = new awsx.eks.Cluster("pulumi-eks-cluster", { vpcId: vpc.id, subnetIds: vpc.privateSubnetIds, }); // Export the cluster's kubeconfig. export const kubeconfig = cluster.kubeconfig; // Deploy the newrelic-private-minion Helm chart. const newrelicChart = new kubernetes.helm.v3.Chart("newrelic-private-minion", { chart: "newrelic-private-minion", // You need to specify the repository if it's not in the Helm stable repository fetchOpts: { repo: "https://helm-charts.newrelic.com", // Replace with the correct repository URL }, // Optionally, you can provide values to customize the deployment as needed. values: { // Placeholder values, replace with actual configuration. licenseKey: "<Your-NewRelic-License-Key>", clusterName: "<Your-Cluster-Name>", // ...additional chart values. }, }, { provider: cluster.getProvider() }); // Export the Helm chart name and status. export const newrelicChartName = newrelicChart.getResourceName(); export const newrelicChartStatus = newrelicChart.status;


    • The awsx.ec2.Vpc resource is used here to create a new VPC configured with private subnets and distributed across two availability zones for high availability.
    • An EKS cluster named pulumi-eks-cluster is provisioned with the awsx.eks.Cluster resource within the VPC created above. By default, the EKS cluster will be created with an IAM role and security groups.
    • The kubeconfig output exported makes it possible for you to interact with your cluster using kubectl by simply setting this output as your KUBECONFIG environment variable or merging it into your ~/.kube/config file.
    • The Helm chart for newrelic-private-minion is deployed using the kubernetes.helm.v3.Chart resource. Before running this Pulumi program, you must have the correct Helm repository added to your Helm configuration, as it's assumed that the chart is not in the default Helm repo. The fetchOpts is where you specify the repository URL.
    • The values property within the Helm chart is used to specify any configuration options required by the newrelic-private-minion chart. You'll need to replace <Your-NewRelic-License-Key> and <Your-Cluster-Name> with actual values.

    This is a high-level overview and you may need to specify additional configuration parameters based on your requirements. Refer to the awsx and kubernetes.helm.v3.Chart documentation for more details on configuration options.