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 ( |
Pulling the Discovery Service Helm Chart#
Pull and unpack the Discovery Service Helm chart from the NGC catalog. Replace {NGC_API_KEY} with your NGC API key.
# pull the chart from NGC
helm fetch https://helm.ngc.nvidia.com/nvidia/omniverse/charts/discovery-service-2.3.8.tgz --username='$oauthtoken' --password=${NGC_API_KEY}
# unpack the chart and cd into the directory
tar -xvf discovery-service-2.3.8.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 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 (usehttpas the prefix for non-TLS). Optional; only for REST clients.grpc: gRPC endpoint (usehttpas 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→httphost: 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
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
Validate the deployment:
# run smoke test tool
curl http://discovery-service.storage-apis.svc.cluster.local:8080/api/v1/services
Clean up#
To clean up: uninstall the Helm release and delete the namespace.
# uninstall the discovery service
helm uninstall discovery-service -n storage-apis
# delete the namespace
kubectl delete namespace storage-apis
# validate the namespace was deleted
kubectl get namespace storage-apis
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
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.