IBM Cloud Docs
Deploying a Helm chart to a new target

Deploying a Helm chart to a new target

You can copy the configuration of an existing version of a Helm chart and deploy it to a new deployment target. The deployment target options for Helm charts are IBM Cloud Kubernetes Service and Red Hat OpenShift on IBM Cloud.

Deploying a Helm chart to a new target using the console

  1. Go to the Manage > Catalogs in the IBM Cloud® console, and click Private catalogs.
  2. Select the private catalog that contains the current Helm chart version.
  3. Click the existing version from the list of products in your private catalog.
  4. Click Add version from the Version list table.
  5. Select Copy the configuration of an existing version and deploy it to a new target.
  6. Select your existing version.
  7. Click Copy existing version.

Your copied version is displayed in your version list as a separate entry from your existing version. The two versions have the same version number but different deployment targets.

Deploying a Helm chart to a new target by using Terraform

Before you can deploy a Helm chart to a new target by using Terraform, make sure that you have completed the following:

  • Install the Terraform CLI and configure the IBM Cloud Provider plug-in for Terraform. For more information, see the tutorial for Getting started with Terraform on IBM Cloud®. The plug-in abstracts the IBM Cloud APIs that are used to complete this task.
  • Create a Terraform configuration file that is named main.tf. In this file, you define resources by using HashiCorp Configuration Language. For more information, see the Terraform documentation.

Use the following steps to deploy your Helm chart to a new target by using Terraform:

  1. Create an argument in your main.tf file. The following example shows the software version details by using the cm_version resource, where offering_id is used to identify the Helm chart.

    resource "cm_version" "cm_version" {
    catalog_identifier = "catalog_identifier"
    offering_id = "offering_id"
    zipurl = "placeholder"
    }
    

    You can specify target_kinds for the cm_version resource. For more information, see the argument details on the Terraform Catalog Management page.

  2. After you finish building your configuration file, initialize the Terraform CLI. For more information, see Initializing Working Directories.

    terraform init
    
  3. Provision the resources from the main.tf file. For more information, see Provisioning Infrastructure with Terraform.

    1. Run terraform plan to generate a Terraform execution plan to preview the proposed actions.

      terraform plan
      
    2. Run terraform apply to create the resources that are defined in the plan.

      terraform apply