A likely cause for this issue is if the wrong endpoint to your private repository was provided in the TKG_CUSTOM_IMAGE_REPOSITORY variable during cluster configuration.
In order to verify if you supplied the correct endpoint, you can follow the below steps:
- Navigate to "~/.config/tanzu" in your home directory.
- Open "config.yaml" and search for "TKG_CUSTOM_IMAGE_REPOSITORY".
- Note down the value.
The "
TKG_CUSTOM_IMAGE_REPOSITORY" value should point to the IP address or FQDN of your harbor repository. The value SHOULD NOT point to a specific folder such as "management" or likewise. By defining a value other than the "
/yourproject" directory, it will not be possible to pull all images required to install tanzu plugins.
Below is an example of correct and incorrect "TKG_CUSTOM_IMAGE_REPOSITORY" usage:
INCORRECT: "
TKG_CUSTOM_IMAGE_REPOSITORY: harbor.registry.com/yourproject/packages/management"CORRECT: "
TKG_CUSTOM_IMAGE_REPOSITORY: harbor.registry.com/yourproject"
To resolve a wrongly configured value after cluster deployment:
- Navigate to "~/.config/tanzu/config.yaml" in your home directory.
- Edit "config.yaml" with the correct "TKG_CUSTOM_IMAGE_REPOSITORY" value.
- Save changes and exit.
- As we are modifying cluster configuration, it is required to run "tanzu management-cluster upgrade" in order to push the changes.
- Once the upgrade has completed, run (in order) "tanzu plugin clean", "tanzu plugin sync" and "tanzu init".
- All plugins should now be available in your environment. To verify, run "tanzu plugin list".
By following the documentation here: https://docs.vmware.com/en/VMware-Tanzu-Kubernetes-Grid/2.2/tkg-deploy-mc-22/mgmt-deploy-config-ref.html - You can also define "
TKG_CUSTOM_IMAGE_REPOSITORY" in the cluster configuration file, prior to deployment.