Configuring VCF CLI to Pull Plugins from an Authenticated Private Registry
search cancel

Configuring VCF CLI to Pull Plugins from an Authenticated Private Registry

book

Article ID: 452616

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service

Issue/Introduction

When attempting to update or install VMware Cloud Foundation (VCF) CLI plugins from a private, authenticated container registry (such as JFrog Artifactory), the operation fails with an authentication, unauthorized, or access denied error.

Environment

VCF 9.1

vSphere Kubernetes Service

Cause

Per Installing the VCF CLI in Internet Restricted Environments

Note: The VCF CLI supports uploading plugins to private registries that require authentication. However, your private registry must allow the CLI to pull the resulting images without authentication.

Resolution

Add the private registry host to the VCF_CLI_AUTHENTICATED_REGISTRY environment variable within the VCF CLI configuration, and then authenticating locally.

1. Register the authenticated host in the VCF CLI

vcf config set env.VCF_CLI_AUTHENTICATED_REGISTRY <jfrog-host>

Note: Provide the host name only. Do not include https://, paths, or image tags.

2. Authenticate with the private registry

docker login <jfrog-host>

3. Update the VCF Plugin Source

vcf plugin source update default --uri <jfrog-host>/system-vcf/plugins/plugin-inventory:latest