Tenant to Host and DPU mapping example

Check Manual GRPC API usage doc before start

Note

Replace $API_GW_ADDRESS with address of iCP API GW in your environment

Here a full example of the needed gRPC calls for creating a Tenant tenant-a with two Hosts: Host host-a with DPU dpu1-host-a and Host host-b with DPU dpu1-host-b.

The examples use ‘grpcurl’ tool to access the API:

Create Tenant tenant-a:

Copy
Copied!
            

grpcurl -cacert=ca.crt -cert=admin.crt -key=admin.key -servername api-gateway.local \ -proto universe/admin/provisioning/v1/provisioning.proto \ -d '{"name": "tenant-a"}' \ $API_GW_ADDRESS \ universe.admin.provisioning.v1.UniverseProvisioningService.CreateTenant

Create Host host-a:

Copy
Copied!
            

grpcurl -cacert=ca.crt -cert=admin.crt -key=admin.key -servername api-gateway.local \ -proto universe/admin/provisioning/v1/provisioning.proto \ -d '{"host": {"name": "host-a"}}' \ $API_GW_ADDRESS \ universe.admin.provisioning.v1.UniverseProvisioningService.CreateHost

Create Host host-b:

Copy
Copied!
            

grpcurl -cacert=ca.crt -cert=admin.crt -key=admin.key -servername api-gateway.local \ -proto universe/admin/provisioning/v1/provisioning.proto \ -d '{"host": {"name": "host-b"}}' \ $API_GW_ADDRESS \ universe.admin.provisioning.v1.UniverseProvisioningService.CreateHost

Create HostConfiguration host-a-hcfg, mapping Host host-a to Tenant tenant-a:

Copy
Copied!
            

cat << 'EOF' | tee hcfg-a.json { "host_config":{ "name": "host-a-hcfg", "tenant_name": "tenant-a", "host_name": "host-a" } } EOF grpcurl -cacert=ca.crt -cert=admin.crt -key=admin.key -servername api-gateway.local \ -proto universe/admin/provisioning/v1/provisioning.proto \ -d "`cat hcfg-a.json`" \ $API_GW_ADDRESS \ universe.admin.provisioning.v1.UniverseProvisioningService.CreateHostConfig

Create HostConfiguration host-b-hcfg, mapping Host host-b to Tenant tenant-a:

Copy
Copied!
            

cat << 'EOF' | tee hcfg-b.json { "host_config":{ "name": "host-b-hcfg", "tenant_name": "tenant-a", "host_name": "host-b" } } EOF grpcurl -cacert=ca.crt -cert=admin.crt -key=admin.key -servername api-gateway.local \ -proto universe/admin/provisioning/v1/provisioning.proto \ -d "`cat hcfg-b.json`" \ $API_GW_ADDRESS \ universe.admin.provisioning.v1.UniverseProvisioningService.CreateHostConfig

Create DPU dpu1-host-a, mapped to Host host-a:

Copy
Copied!
            

cat << 'EOF' | tee dpu-a.json { "dpu":{ "name":"dpu1-host-a", "host_ref":{ "name": "host-a" } } } EOF grpcurl -cacert=ca.crt -cert=admin.crt -key=admin.key -servername api-gateway.local \ -proto universe/admin/provisioning/v1/provisioning.proto \ -d "`cat dpu-a.json`" \ $API_GW_ADDRESS \ universe.admin.provisioning.v1.UniverseProvisioningService.CreateDPU

Create DPU dpu1-host-b, mapped to Host host-b:

Copy
Copied!
            

cat << 'EOF' | tee dpu-b.json { "dpu":{ "name":"dpu1-host-b", "host_ref":{ "name": "host-b" } } } EOF grpcurl -cacert=ca.crt -cert=admin.crt -key=admin.key -servername api-gateway.local \ -proto universe/admin/provisioning/v1/provisioning.proto \ -d "`cat dpu-b.json`" \ $API_GW_ADDRESS \ universe.admin.provisioning.v1.UniverseProvisioningService.CreateDPU

Separate namespace will be created for each Tenant in iCP cluster. This namespace will be named tenant-<tenant-name>. Also, the namespace will have the label tenant-id.icp.nvidia.com/<tenant-ID>= to indicate that it belongs to a specific Tenant.

If the Host (for example host-a) is mapped to a Tenant (for example tenant-a), and is associated to a DPU, the Kubernetes node matching this DPU will have the following labels:

  • tenant-id.icp.nvidia.com/tenant-a=

  • hostname.icp.nvidia.com/host-a=

Previous Examples
Next Tenant cluster
© Copyright 2023, NVIDIA. Last updated on Feb 7, 2024.