Deploy the ibm-platform-navigator helm chart on Oracle Kubernetes Engine (OKE)
TypeScriptTo deploy the IBM Platform Navigator Helm chart on Oracle Kubernetes Engine (OKE), you need to perform several steps using Pulumi. First, you'll need to create an Oracle Kubernetes Engine (OKE) cluster. Then, you'll need to use the Helm Release resource to deploy your Helm chart onto the cluster.
Let's go through the process step by step:
-
Set up an OKE cluster: We will use the
oci.ContainerEngine.Cluster
resource from the OCI Pulumi provider to create an Oracle Kubernetes Engine cluster where the Helm chart will be deployed. -
Add a Kubernetes provider instance: This is necessary to connect to the OKE cluster and to deploy Helm charts onto it.
-
Deploy the Helm chart: Use the
kubernetes.helm.v3.Chart
resource to deploy the IBM Platform Navigator Helm chart to the OKE cluster.
Here's a complete Pulumi program in TypeScript that captures these steps. Please ensure you have the necessary OCI credentials set up in your Pulumi configuration or environment variables prior to running this code.
import * as pulumi from '@pulumi/pulumi'; import * as oci from '@pulumi/oci'; import * as k8s from '@pulumi/kubernetes'; // Replace these variables with the appropriate values for your environment const compartmentId = 'Your_OCI_Compartment_ID'; const vcnId = 'Your_VCN_ID'; const kubernetesVersion = 'Your_OKE_Kubernetes_Version'; // e.g., v1.20.8 const publicSubnetIds = ['Your_Public_Subnet_ID1', 'Your_Public_Subnet_ID2']; // Create an Oracle Kubernetes Engine (OKE) cluster const cluster = new oci.ContainerEngine.Cluster('myOkeCluster', { // Required properties for the OKE cluster compartmentId, kubernetesVersion, name: 'my-oke-cluster', vcnId, options: { serviceLbSubnetIds: publicSubnetIds, }, }); // Obtain cluster kubeconfig to interact with the cluster const kubeconfig = pulumi.all([cluster.id]).apply(([clusterId]) => { return oci.containerengine.getClusterKubeconfig({ clusterId, }); }); // Create a Kubernetes provider instance and configure it to connect to the OKE cluster const k8sProvider = new k8s.Provider('k8sProvider', { kubeconfig: kubeconfig.apply(kc => kc.content), }); // Define the Helm chart for IBM Platform Navigator const ibmPlatformNavigatorChart = new k8s.helm.v3.Chart('ibmPlatformNavigator', { chart: 'ibm-platform-navigator', version: 'Your_Chart_Version', // Specify your chart version fetchOpts: { repo: 'https://charts.your-repo.com', // The Helm repository URL where your chart is located }, }, { provider: k8sProvider }); // Exposing the OKE cluster API server endpoint export const kubeApiEndpoint = cluster.endpoints.apply(ep => ep.publicEndpoint);
Before you run this code, make sure that you have specified the correct version for the IBM Platform Navigator Helm chart and its repository URL.
Once set up, you can deploy this with the Pulumi CLI using
pulumi up
, which will provision the cluster and deploy the Helm chart to it.You can learn more about the resources used in this program by visiting their official Pulumi documentation:
This should establish a solid foundation for deploying the IBM Platform Navigator on OKE using Pulumi. Remember to adjust the resource properties to fit the specifics of your cloud environment, such as the used compartment ID, VCN ID, subnet IDs, and Kubernetes version.
-