Deploy the apicurio-registry-sql helm chart on Linode Kubernetes Engine
TypeScriptTo deploy the apicurio-registry-sql Helm chart on a Linode Kubernetes Engine (LKE) cluster, I'll guide you through the process.
Firstly, ensure that you have the Linode CLI set up on your machine and that your Pulumi project is correctly configured to use your Linode Kubernetes Engine resources.
We will use the
kubernetes
package to work with resources in a Kubernetes cluster. Specifically, we'll use theChart
resource from thekubernetes.helm.sh/v3
API to deploy the Helm chart.In this example, you should have an existing LKE cluster, and you should be authenticated with
kubectl
to interact with your cluster. Helm charts are a convenient way to manage Kubernetes applications, and Apicurio Registry is a datastore for standard event schemas and API designs that offers compatibility with Kafka, Avro, JSON Schema, and other formats.Here is the Pulumi program to deploy
apicurio-registry-sql
on LKE:import * as kubernetes from "@pulumi/kubernetes"; // You should replace <YOUR-NAMESPACE> with your namespace where you want to deploy this chart const namespace = "<YOUR-NAMESPACE>"; // Deploy apicurio-registry-sql helm chart on Linode Kubernetes Engine using Pulumi const apicurioRegistrySqlChart = new kubernetes.helm.v3.Chart("apicurio-registry-sql", { // Specify your Kubernetes namespace here namespace: namespace, // Replace with the correct chart name and repository if it differs chart: "apicurio-registry-sql", // You can specify the version of the chart you want to deploy version: "1.0.0", // If your chart requires specific values, define them here values: { // These are placeholder values, you should provide the correct configuration // for your instance of Apicurio Registry // e.g., persistence: { enabled: true, size: "10Gi" } }, // If the Helm chart is in a custom repository, you need to specify it here fetchOpts: { repo: "https://<repo-url>", // Replace <repo-url> with the appropriate Helm repository URL }, }, { // Make sure that your Pulumi code knows that these resources depend on // the LKE cluster being up and available. dependsOn: [/* your Linode cluster resource */], }); // Export the base URL of the Apicurio Registry after it's deployed export const apicurioRegistryUrl = apicurioRegistrySqlChart.getResourceProperty( "v1/Service", "apicurio-registry-sql", "status" ).apply(status => status.loadBalancer.ingress[0].ip || status.loadBalancer.ingress[0].hostname);
Replace
<YOUR-NAMESPACE>
with the actual namespace where the chart should be installed and ensure that you provide the correctrepo
URL for the Helm chart. You also might need to replacechart
andversion
properties with their actual values, depending on which version of the Apicurio Registry you are deploying and the exact name of the chart in the Helm repository.Please note that you will need to specify the Helm chart's custom values as per the requirements of apicurio-registry-sql chart. Custom values usually configure persistent storage, resource limits, and other configurations that are specific to the application.
Lastly, the export statement provides a way to obtain the base URL to access the Apicurio Registry once it's deployed.
After writing this program, you can execute it with Pulumi CLI by running
pulumi up
. This will provision the resources as per the script and show you the exported URL on completion. Remember, you also need to have linode-cli installed and configured to make changes to your LKE resources through Pulumi.