Skip to navigation

Turn off validation for a supported registry

View as MarkdownOpen in Claude

The NVCF API validates credentials and images for every supported registry. This guide shows how to turn off that validation for one registry. With validation off, you can run container functions without a registry credential in NVCF, or with a credential that the NVCF API cannot check. The example pulls from Amazon ECR with the EKS node IAM role instead of long-lived IAM user keys.

For a registry that NVCF does not support, use Allowlisting an Unsupported Registry instead. NVCF does not validate unsupported registries.

What each check does

Each supported registry has two checks in the NVCF API. Both checks are on by default.

SettingWhen the NVCF API runs the checkWhat the check does
credential-validation.enabledWhen you add or update a registry credentialCalls the registry to confirm that the credential works.
artifact-validation.enabledWhen you create or deploy a functionRequires a stored credential for the image hostname, then calls the registry to confirm that the image exists.

Turn off artifact-validation when the cluster pulls images with its own identity. Turn off credential-validation only if the NVCF API cannot check a credential that you store.

Read these effects before you change a setting:

  • Each setting applies to every account on the control plane and to every image hostname that maps to the same key.
  • With artifact validation off, function create and deploy no longer check that the image exists. A wrong image path or tag fails at deployment, with ErrImagePull on the function pod.
  • The settings apply to container functions and container tasks. Helm functions and Helm tasks do not support this setup.

Turn off the checks

  1. Add this override to the values of the api release. Replace <key> with the key for your image hostname:

    KeyImage hostname
    ngcnvcr.io
    dockerdocker.io
    ecr<account-id>.dkr.ecr.<region>.amazonaws.com, for every AWS account and region
    ecr-publicpublic.ecr.aws
    acrAny hostname that contains azurecr.io, such as <registry>.azurecr.io
    volcengine<registry>-<region>.cr.volces.com
    harborThe hostname that you set on the entry
    artifactoryThe hostname that you set on the entry

    Keep only the check that you want to turn off:

    api:
    remoteConfig:
    configData:
    nvcf:
    registries:
    recognized:
    container:
    <key>:
    artifact-validation:
    enabled: false
    credential-validation:
    enabled: false

    In a Helmfile deployment, add the override to your environment file, environments/<environment-name>.yaml. With helm upgrade, pass it in a values file with -f.

  2. Apply the values with the helmfile or helm upgrade command that you use for the control plane.

  3. Confirm that the NVCF API configuration has the settings:

    kubectl -n nvcf get configmap -l app.kubernetes.io/name=helm-nvcf-api -o yaml \
    | grep -A1 'validation'

    The output shows enabled: false under each check that you turned off.

For container tasks, set artifact-validation for the NVCT API under nvctApi.remoteConfig.configData.nvct.registries.recognized.container.<key>.

ECR example with the EKS node IAM role

This example shows one way to pull from ECR without long-lived IAM user keys. The kubelet on each EKS GPU node pulls the image with the node IAM role. NVCF stores no ECR credential, so it sends no image pull secret for ECR. If you give the cluster access to ECR in another way, replace step 1 with your own setup. Steps 2 to 6 stay the same.

  1. On the GPU nodes that run function pods, give the node IAM role read access to your ECR repositories. The AWS managed policy AmazonEC2ContainerRegistryReadOnly grants this access. For least privilege, attach the private ECR policy from Step 2: Create and Attach ECR Policy instead. If the repositories are in another AWS account, also add a repository policy in that account that allows the node IAM role to pull images.

  2. Delete any ECR credential that NVCF stores. If one exists, NVCF sends it to the cluster. Valid keys are then used for the pull, and expired or invalid keys make the deployment fail. Find it with ./nvcf-cli registry-credential list, then delete it as described in Deleting Registry Credentials.

  3. Leave ECR out of api.accountBootstrap.registryCredentials. NVCF marks bootstrap credentials as SYSTEM, and you cannot delete them later.

  4. Turn off artifact validation for the ecr entry, as described in Turn off the checks. Credential validation does not apply, because you store no ECR credential:

    api:
    remoteConfig:
    configData:
    nvcf:
    registries:
    recognized:
    container:
    ecr:
    artifact-validation:
    enabled: false
  5. Create a function with an ECR image. Set the inference and health values for your image:

    ./nvcf-cli function create \
    --name ecr-node-role-test \
    --image "<account-id>.dkr.ecr.<region>.amazonaws.com/<repository>/<image>:<tag>" \
    --inference-url "/health" --inference-port 8080 \
    --health-uri "/health" --health-timeout PT30S

    The command returns a function ID and a version ID.

  6. Deploy the function. Set the GPU and instance type for your cluster. The command uses the function ID and version ID from step 5:

    ./nvcf-cli function deploy create \
    --gpu "<gpu>" \
    --instance-type "<instance-type>"

    The deployment becomes ACTIVE when the GPU node has pulled the image and the function is healthy.

Troubleshoot validation settings

  • If function create returns Missing CONTAINER registry credential for hostname '<hostname>', artifact validation is still on for the registry entry. Repeat step 3 of Turn off the checks. If the ConfigMap is correct, restart the NVCF API:

    kubectl -n nvcf rollout restart deployment -l app.kubernetes.io/name=helm-nvcf-api
  • If the function pod shows ErrImagePull or ImagePullBackOff, the cluster cannot pull the image. Run kubectl describe pod on the function pod to see the registry error. Then check the image path and tag, and the identity or image pull secret that the cluster uses for the registry.