1. Deploy the hivemq-platform-operator helm chart on Oracle Kubernetes Engine (OKE)


    To deploy the HiveMQ Platform Operator Helm chart on Oracle Kubernetes Engine (OKE), we will first create an Oracle Kubernetes cluster using Pulumi. Once the cluster is established, we'll then use the Pulumi Kubernetes provider to deploy the HiveMQ Platform Operator through a Helm chart.

    Here’s how you will accomplish this:

    1. Create an OKE Cluster: Use oci.ContainerEngine.Cluster to provision a new Kubernetes cluster in your OCI environment. This will be the foundation where the HiveMQ Platform will operate.

    2. Deploy the Helm Chart to OKE: With the Kubernetes cluster in place, use the kubernetes.helm.v3.Chart resource from the Pulumi Kubernetes provider to deploy the HiveMQ Platform Operator Helm chart to your cluster.

    Below is a detailed Pulumi program written in TypeScript that carries out these steps:

    import * as oci from "@pulumi/oci"; import * as kubernetes from "@pulumi/kubernetes"; import * as pulumi from "@pulumi/pulumi"; // Create an Oracle Kubernetes Engine (OKE) Cluster const okeCluster = new oci.containerengine.Cluster("hivemqOkeCluster", { // Specify the required information for OKE cluster creation // Replace the placeholders with your information compartmentId: "YOUR_COMPARTMENT_ID", kubernetesVersion: "v1.19.7", name: "hivemq-cluster", vcnId: "YOUR_VCN_ID", options: { // ... additional configurations if needed }, }); // Once the cluster is provisioned, we can configure our Kubernetes provider const k8sProvider = new kubernetes.Provider("okeK8sProvider", { kubeconfig: okeCluster.kubeconfig, }); // Deploy the HiveMQ Platform Operator Helm chart const hivemqChart = new kubernetes.helm.v3.Chart("hivemq-platform-operator", { chart: "hivemq-platform-operator", // Specify the Helm repository where the chart is located fetchOpts: { repo: "https://helm-repo.hivemq.com/charts", }, // You can optionally specify values to override the default // configurations in the chart using the `values` property values: { // ... your value overrides }, }, { provider: k8sProvider }); // Export the kubeconfig and cluster endpoint to access your OKE cluster export const kubeconfig = okeCluster.kubeconfig; export const clusterEndpoint = okeCluster.endpoints.apply(e => e.publicEndpoint);

    Make sure to replace YOUR_COMPARTMENT_ID and YOUR_VCN_ID with the respective identifiers where you wish to create your OKE cluster.


    • OCI Container Engine for Kubernetes Resources (oci): This Pulumi package provides resources for managing Oracle Cloud Infrastructure (OCI), including the creation of Oracle Kubernetes Engine clusters. The oci.ContainerEngine.Cluster resource is used here to create a managed Kubernetes cluster within a specified compartment and VCN in your OCI account.

    • Pulumi Kubernetes Provider (kubernetes): This package enables Pulumi to work with Kubernetes resources, including deploying applications using Helm charts. The kubernetes.helm.v3.Chart resource represents a Helm chart in a Kubernetes cluster which we use to deploy the HiveMQ Platform Operator.

    • Configuration: The Pulumi program uses the OKE cluster's kubeconfig to set up the Kubernetes provider. This allows Pulumi to deploy resources to the newly created OKE cluster.

    • Helm Chart: The program defines a Helm chart deployment using the name of the chart and its Helm repository. Pulumi will instruct Helm to deploy the HiveMQ Platform Operator as described by the chart in the informed repository.

    Remember to have Pulumi CLI installed and configured for your OCI account. You will also need to install the OCI and Kubernetes Pulumi plugins by running pulumi plugin install resource oci <version> and pulumi plugin install resource kubernetes <version>, respectively, where <version> refers to the version of the plugins you intend to use.

    After you have this program set up, you can run pulumi up to provision the OKE cluster and deploy the Helm chart. The process is declarative and the Pulumi engine will handle the required steps to reach the desired state described in the code.