Discovery Service Configuration#

Goal: Deploy the Discovery Service so clients can find and connect to all services via a single JSON endpoint instead of hardcoding each service URL.

The Discovery Service is a central access point: clients request one JSON response that lists all available services and how to connect. Deploying it during setup lets clients and other services discover what is available and simplifies integration.

Note

If you removed earlier deployments, recreate them so you can build on the previous steps.

Service Ports#

Port

Protocol

Description

8080

HTTP/REST

Discovery API endpoints (/api/v1/services, /api/v1/auth-config)

These endpoints belong to the deployment’s Discovery Service. The Storage Service also exposes /v2alpha/services on its REST endpoint to describe the API groups implemented by that Storage Service instance. Use the Discovery Service endpoint to locate services across the deployment; use the Storage Service endpoint to inspect that adapter’s capabilities.

Pulling the Discovery Service Helm Chart#

Pull and unpack the Discovery Service Helm chart from the NGC catalog. Use the NGC_API_KEY Bash variable set in Requirements.

# pull the chart from NGC
helm fetch https://helm.ngc.nvidia.com/nvidia/omniverse/charts/discovery-service-1.1.0.tgz --username='$oauthtoken' --password="${NGC_API_KEY:?Set NGC_API_KEY in this Bash session}"

# unpack the chart and cd into the directory
tar -xvf discovery-service-1.1.0.tgz
cd discovery-service

Create the Discovery Service values file#

Use discovery-values.yaml as the values file (same as previous examples).

# create and edit the local values file, we're using VS Code for this example
code discovery-values.yaml

Add the image-pull secret so the Discovery Service can pull images from NGC.

image:
  pullSecrets:
    - name: ngcpull-secret
  repository: "nvcr.io/nvidia/omniverse/simple-nginx"

discovery-values.yaml

Discovery Schema#

The Discovery Service responds with a JSON object describing each service. Current schema:

 1{
 2    "schema-version": 1,
 3    "services": [
 4        {
 5            "id": "service-service-id...",
 6            "name": "service-name",
 7            "type": "service-type",
 8            "rest": "https://{service-hostname}:{service-port}",
 9            "grpc": "grpc://{service-hostname}:{service-port}"
10        }
11    ]
12}

Schema fields (used by Kit-based apps to discover services):

  • id: Unique identifier for the service.

  • name: Human-readable name.

  • type: Service type.

  • rest: REST endpoint (use http as the prefix for non-TLS). Optional; only for REST clients.

  • grpc: gRPC endpoint (use http as the prefix for non-TLS). Optional; only for gRPC clients.

Set the Discovery Response#

Configure the Discovery Service to include the storage service and (optionally) notification services. Defaults include both; if you deploy only the storage service, edit discovery-values.yaml to list only the storage service.

The fully qualified hostname is built at deploy time from the host, namespace, and port:

  • tls: true → https, false → http

  • host: Default service name (e.g. storage-service). When left empty in the configuration, it is automatically populated at deploy time with this default.

  • port: Service port

Example: in namespace storage-apis, the storage service is http://storage-service.storage-apis.svc.cluster.local with the ports below.

discovery:
  services:
    - id: "storage-service-01"
      name: "Storage Service"
      type: "storage"
      endpoints:
        grpc:
          host: ""   # empty = auto-populated with default service name at deploy time
          port: 8011
          tls: false
        rest:
          host: ""   # empty = auto-populated with default service name at deploy time
          port: 8012
          tls: false

discovery-values.yaml

Install the Discovery Service.

# validate the chart
helm template . -f discovery-values.yaml

# dry-run the install
helm upgrade --install discovery-service . -f discovery-values.yaml --namespace storage-apis --dry-run --debug

If everything looks good, you can install the Discovery Service.

# install the discovery service
helm upgrade --install discovery-service . -f discovery-values.yaml --namespace storage-apis

# validate the pod is running, this may take a few minutes to start up
kubectl get pods -n storage-apis

Where to run: Use an environment that can resolve Kubernetes service DNS and reach the cluster network.

Check Discovery:

curl --fail --silent --show-error \
  http://discovery-service.storage-apis.svc.cluster.local:8080/api/v1/services

Expected result: Discovery returns a JSON response describing the configured services. Review the returned endpoints against your deployment.

If the hostname cannot be resolved, check where you are running the command before changing the service configuration.

Optional: uninstall Discovery#

Run this step only when removing Discovery. Keep it installed when continuing with the remaining deployment steps.

# uninstall the discovery service
helm uninstall discovery-service -n storage-apis

For removal of all services, see Remove the Complete Deployment.

Smoke Tests#

The Discovery Service Helm chart includes 2 smoke tests that verify both versions of the services endpoint are reachable and return a valid discovery payload.

To enable smoke tests, set smokeTest.enabled=true and add an image-pull secret if your cluster requires one:

smokeTest:
  enabled: true
  image:
    pullSecrets:
      - name: ngcpull-secret

Run them with helm test after deployment:

helm test discovery-service -n storage-apis

discovery-values.yaml

What’s Next?#

Next: Deploy the Notifications Services to add more functionality, or use a Kit-based application to validate your end-to-end workflow.