Offer Terraform Kubernetes apps through Cloud Marketplace

Terraform Kubernetes apps in Google Cloud Marketplace let your customers use Terraform to deploy your containerized apps on Google Kubernetes Engine. Your users aren't charged for their usage of your Terraform Kubernetes apps, but they're charged for their usage of Google Cloud resources. You can offer Terraform Kubernetes apps publicly to all Cloud Marketplace users, or privately by using Private Offers.

Terraform Kubernetes apps that you offer through Cloud Marketplace define their configurations by using Helm charts, which you host in Artifact Registry. After that's set up, you onboard your app to Cloud Marketplace through Producer Portal.

Overview of onboarding a Terraform Kubernetes app

Offering a Terraform Kubernetes app through Cloud Marketplace involves the following steps:

  1. Prepare your Terraform Kubernetes app for Cloud Marketplace. This includes setting up Artifact Registry and pushing your app's images to it.

  2. Add pricing information for your app in Producer Portal.

  3. Configure your app's deployment in Producer Portal, including its Terraform module, Helm chart, and container images.

  4. Publish your product to Cloud Marketplace. As you onboard your product, you submit various parts of your product for review. The Cloud Marketplace team reviews each submission and works with you to resolve any issues before approving it. When all of your submissions are approved, you can publish and launch the product within a few minutes.

Requirements for Terraform Kubernetes apps

All products that you offer through Cloud Marketplace must comply with the Cloud Marketplace listing requirements.

Your Terraform Kubernetes app must meet the following additional requirements:

  • Your app must run on GKE nodes that use x86 processors.
  • All of your app's Helm charts and container images must be uploaded to your Artifact Registry registry, to the same repository and project that you're using for your Terraform Kubernetes app.
  • Your Artifact Registry registry must include a Helm chart.
  • Your Terraform module must be hosted as a ZIP file in a Cloud Storage bucket located in the same project that you're using for your Terraform Kubernetes app.
  • You must enable versioning for the Cloud Storage bucket that you use to host your Terraform module.
  • You must include a user guide, with steps to deploy your app from the command line, configure the app, and use the app. For details, see Requirements for your user guide in this document.
  • To protect users from unstable APIs, use only beta or generally available Kubernetes resources.

Requirements for your app images

Your app images must meet the following requirements:

  • All of your app's images must be tagged with the release track and the current version. For example, if you're releasing version 2.0.5 on the 2.0 release track, all corresponding images must be tagged with 2.0 and 2.0.5. For details, see Organize your releases.
  • All of your app's images must contain the following annotation in their image manifest:

    com.googleapis.cloudmarketplace.product.service.name=services/SERVICE_NAME
    

    Replace SERVICE_NAME with the name of your service. To find your service name, refer to the table of products on the Overview page in Producer Portal. For more information about annotations, see the Open Container Initiative's documentation of annotations on GitHub.

Requirements for your Artifact Registry repository

Your app's Helm chart and container images must be part of a single Artifact Registry repository.

For example, if your Artifact Registry repository is us-docker.pkg.dev/exampleproject, your app's Helm chart and container images should resemble the following:

  • us-docker.pkg.dev/exampleproject/exampleapp/chart
  • us-docker.pkg.dev/exampleproject/exampleapp/image1
  • us-docker.pkg.dev/exampleproject/exampleapp/image2

Requirements for the Terraform module

Customers use the Terraform module to deploy your product from Cloud Marketplace through Infrastructure Manager. The Terraform module packages your app's Kubernetes configuration.

Use the example module as a starting point, and follow the partner guide to build a Terraform module that's compatible with your app.

Parameters passed to your app

Your Terraform module must declare parameters that need to be collected from customers when they select your app. These parameters are then supplied to the Helm chart container when users deploy the app.

To configure these parameters, your Terraform module must include a schema.yaml file.

To learn how to create a schema.yaml, see the guide to creating a schema on GitHub.

GPU cluster requests

If your app has specific GPU needs, or is GPU intensive, you can specify the type and number of GPUs in the cluster by using your deployer schema. If you specify your GPU needs, you turn off assisted cluster creation.

Your app may request a generic Nvidia GPU, or a specific Nvidia platform.

Requirements for your app's user guide

Your app's user guide must include the following information:

  • Overview: A general overview of your app, covering basic functions and configuration options. This section must also link to your published app on Cloud Marketplace.
  • One-time setup: This includes steps for configuring Helm and installing the Application CustomResourceDefinition (CRD) so that your cluster can manage the Application resource.
  • Installation: This includes the following:
  • Basic Usage: Guides for the following tasks:
    • Modifying usernames and passwords
    • Connecting to an admin console, if applicable
    • Connecting a client tool and running a sample command, if applicable
    • Enabling ingress and installing TLS certs, if applicable
  • Back up and restore: Information about backing up the app state and restoring the app state from a backup.
  • Image updates: Information about updating the app images for patches or minor updates.
  • Scaling: Information about scaling the app, if applicable.
  • Deletion: Guides for deleting the app and cleaning up any resources that might remain, such as PersistentVolumeClaims.

What's next