"During installation it fails with error : Error: packageinstall/cert-manager (packaging.carvel.dev/v1alpha1) namespace: tkg-system: Reconciling: . Reconcile failed: Expected to find at least one version, but did not (details: all=0 ->..."k get pkgi package_name -n package_namespace -o yaml PackageInstall resource) was unable to locate the necessary package definition (Package custom resource) required for reconciliation.This lookup failure occurred because:
The VKS Standard Package Repository (the PackageRepository custom resource) was initially created in a custom namespace.
The system attempts to install the Standard Packages into the required target namespace, which is tkg-system
The reconciliation process for a PackageInstall in the tkg-system namespace looks for the package versions within its configured scope, but because the package source (the repository) was registered in a custom namespace, the package installation failed.
tanzu package repository delete <REPOSITORY-NAME> -n <REPOSITORY-CUSTOM-NAMESPACE>tkg-system:
tanzu package repository add standard-repo --url <REPOSITORY_URL> -n tkg-systemtanzu package install <PACKAGE-NAME> -p <AVAILABLE-PACKAGE-NAME> -v <AVAILABLE-PACKAGE-VERSION> --values-file <PACKAGE-CONFIGURATION-FILE> -n <TARGET-NAMESPACE>Example : tanzu package install cert-manager -p cert-manager.tanzu.vmware.com --namespace package-installed --version 1.12.2+vmware.2-tkg.2
Note : Flag " --values-file" is optional.