1. Deploy the pinot helm chart on Rancher


    To deploy the Apache Pinot helm chart onto a Kubernetes cluster managed by Rancher, we need to follow these steps:

    1. Set up the Rancher Kubernetes Cluster: Ensure that you have a Kubernetes cluster created and managed by Rancher and that you have access to it.
    2. Add the Helm Chart Repository: You will need to add the Apache Pinot Helm chart repository to the list of repositories that your Rancher setup can access.
    3. Install the Apache Pinot Helm Chart: Use Rancher's capabilities to install the Helm chart onto your Kubernetes cluster.

    Below is a program in TypeScript using Pulumi to carry out these actions. We will be using the rancher2 provider for Pulumi to work with Rancher resources. The rancher2 provider allows you to manage resources in a Rancher v2.x installation.

    First, we must ensure we have installed the necessary Pulumi provider by running pulumi plugin install resource rancher2 <VERSION>, where <VERSION> is the version of the provider you want to use.

    Detailed Program Explanation

    Let's go through the code step by step:

    • Set Up Pulumi Rancher Provider: We first import the rancher2 package and configure it to use the appropriate API URL and access credentials for the Rancher server.
    • Create Catalog: Next, we create a CatalogV2 resource, which represents a Helm chart repository in Rancher. We specify the URL of the Apache Pinot Helm chart repository, which Rancher uses to fetch the chart.
    • Deploy Chart: Finally, we use the AppV2 resource to deploy the Apache Pinot Helm chart into our cluster. We pass in the necessary configuration parameters, such as the chart name and version.
    import * as rancher2 from '@pulumi/rancher2'; import * as k8s from '@pulumi/kubernetes'; // This example assumes that you have a Rancher-managed Kubernetes cluster and are authenticated with the `rancher2` provider. // Create a new catalog (Helm chart repository) within Rancher const pinotCatalog = new rancher2.CatalogV2("pinotCatalog", { url: "https://helm.pinot.apache.org.", clusterId: "<RANCHER_CLUSTER_ID>", // Replace with your own Rancher cluster ID }); // Deploy the Apache Pinot Helm Chart from the newly added catalog const pinotApp = new k8s.helm.v3.Chart("apache-pinot", { // Replace 'default' with the target namespace in your cluster if different namespace: "default", chart: "pinot", version: "0.1.0", // Specify the chart version you want to deploy fetchOpts: { repo: "https://helm.pinot.apache.org/", // Apache Pinot Helm chart repository URL }, // You can define values for the helm chart here, for example: values: { // Define your custom values for Apache Pinot here }, }, { dependsOn: pinotCatalog }); // Export the application name export const app_name = pinotApp.metadata.apply(m => m.name);

    Important Notes:

    • The clusterId must match the ID of your Kubernetes cluster as registered in Rancher.
    • Make sure the namespace you specify in the Chart resource matches one that exists within your Kubernetes cluster.
    • Use the values property in the Chart resource to customize the Apache Pinot installation with any desired configuration. Always consult the Apache Pinot Helm chart documentation for available configuration options.
    • This example assumes that your ambient credentials are sufficient to communicate with the Rancher API server and that the Pulumi CLI is configured with access to your Kubernetes cluster.

    After completing the code, run pulumi up to execute the deployment. This command will prompt you to confirm the deployment after showing you the planned changes. Upon confirmation, Pulumi will apply the changes, and if successful, you'll see the outputs, including the application name.