The public service API specification in a global namespace manifest file requires the ID of a health check.

To get a health-check ID, you can retrieve the API specification that corresponds to the health-check configuration from Tanzu Service Mesh SaaS, add the configuration to a manifest file, then provide values for the fields in the manifest file, and finally apply the manifest using the Tanzu Service Mesh.

Prerequisites

Procedure

  1. To describe the health-check configuration, create a YAML manifest file.
  2. To retrieve the API specification that corresponds to a health-check configuration, run the following command.
    tanzu sm get spec healthchecks
  3. Copy and paste the returned API specification into the manifest file.
  4. Open the file for editing and then provide values for the fields.

    For information about the meaning of the fields in the manifest and what value to provide for each field, see the schema of the health-checks API in API Explorer in Tanzu Service Mesh. Perform the following steps:

    1. In Tanzu Service Mesh SaaS UI, click API Explorer on the bottom bar.

    2. In API Explorer, click POST /v1alpha1/templates/health-checks.

    3. In the API, under Request Body, click Schema.

    An example of a health check manifest with values.

    metadata:
      project: default
    spec:
      name: my-tsm.servicemesh.biz
      protocol: HTTP
      domain: my-tsm.servicemesh.biz
      port: 3000
      path: /
      healthThreshold: 3
      certificate_id: ''
      external_port: 80
      interval: 10
    
  5. Save the changes in the file.
  6. Run the following CLI command.
    tanzu sm apply -f {manifest file}

    Where {manifest file} is the name of the manifest file that describes the health-check configuration.

    The command returns the health check ID.

What to do next

Add the health check ID to the public service API specification in the global namespace manifest file. For more information, see Create a Global Namespace.