Deploy the infoscale-vtas helm chart on Oracle Kubernetes Engine (OKE)
TypeScriptTo deploy the
infoscale-vtas
Helm chart on Oracle Kubernetes Engine (OKE) using Pulumi, you will need to follow several steps. These involve setting up the OKE cluster (if not already created) and using the Helm Chart resource to deployinfoscale-vtas
.Below is a TypeScript program using Pulumi to deploy the Helm chart. This program assumes you have already configured Pulumi with the necessary Oracle Cloud credentials and have an OKE cluster up and running. I will use the
oci.ContainerEngine.Cluster
resource to reference the existing OKE cluster and thekubernetes.helm.sh/v3.Chart
resource to deployinfoscale-vtas
.Here's the detailed process:
-
Reference Existing OKE Cluster: We will create an Oracle Kubernetes Engine instance programmatically if it doesn't exist or reference an existing one. The cluster needs to be up and running before deploying Helm charts on it.
-
Deploy Helm Chart: We will use the
Chart
resource from thekubernetes
Pulumi provider to deploy theinfoscale-vtas
Helm chart. Helm is a package manager for Kubernetes, which allows for easy installation and management of applications. -
Configure Chart Values: If the
infoscale-vtas
Helm chart requires specific values for configuration, these can be set in thevalues
property of theChartArgs
.
Let's take a look at the program:
import * as pulumi from '@pulumi/pulumi'; import * as oci from '@pulumi/oci'; import * as k8s from '@pulumi/kubernetes'; // Assume we have the OKE cluster's details in our Pulumi stack configuration. const config = new pulumi.Config(); const okeClusterId = config.require("okeClusterId"); const okeClusterCompartmentId = config.require("okeClusterCompartmentId"); // Reference to an existing OKE cluster using its OCID (Oracle Cloud Identifier). const cluster = oci.containerengine.Cluster.get("existingCluster", { id: okeClusterId, }); // Get the kubeconfig from the existing OKE Cluster. const kubeconfig = pulumi.all([cluster.id, cluster.compartmentId]).apply( ([id, compartmentId]) => oci.containerengine.getClusterKubeconfig({ clusterId: id, compartmentId: compartmentId, }), ); // Create a Kubernetes provider instance using the kubeconfig from the OKE cluster. const k8sProvider = new k8s.Provider("okeProvider", { kubeconfig: kubeconfig.config, }); // Deploy the Helm chart for 'infoscale-vtas' on the OKE cluster. const infoscaleVtasChart = new k8s.helm.v3.Chart("infoscale-vtas-helm-chart", { chart: "infoscale-vtas", // Replace the version and repo URL below with the actual chart information. version: "1.0.0", fetchOpts: { repo: "https://charts.example.com/", }, // If the chart requires configuration, specify the values here. values: { // Configuration values for your chart // e.g., "key": "value", }, }, { provider: k8sProvider }); // Export the public endpoint of the infoscale-vtas service if it creates any. export const endpoint = infoscaleVtasChart.getResourceProperty( "v1/Service", "infoscale-vtas-service", "status", "loadBalancer.ingress[0].hostname", );
With the above program, Pulumi will use your Oracle Cloud Infrastructure credentials to deploy the
infoscale-vtas
Helm chart onto your existing OKE cluster. Remember to replace the placeholderversion
andrepo
values in theChart
resource with the actual version of the Helm chart you wish to deploy and the repository where the chart is hosted.You might need to install the Pulumi CLI, configure it to connect to your Oracle Cloud account, and set up the required OCI provider.
This program exports the endpoint at which the
infoscale-vtas
services are available. If the Helm chart exposes any services with public endpoints, you will be able to access them using this exported value.-