VKS Standard Packages installation is failing in a Guest Cluster. "Error : Expected to find at least one version"
search cancel

VKS Standard Packages installation is failing in a Guest Cluster. "Error : Expected to find at least one version"

book

Article ID: 416848

calendar_today

Updated On:

Products

Tanzu Kubernetes Runtime

Issue/Introduction

  • During any VKS Standard Package installation, it fails with the following error:
    • "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 ->..."
  • On describing the failed package installation, we observe the following: 
    • k get pkgi package_name -n package_namespace -o yaml 

  • The package repository was created on a CUSTOM_NAMESPACE.

Environment

  • VMware vCenter Server Appliance 8.0
  • VKr 1.33
  • vSphere Supervisor 1.30

Cause

  • The installation failed because the package installer (a 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.

Resolution

  1. Delete the mis-configured VKS Standard Package Repository :
    • tanzu package repository delete <REPOSITORY-NAME> -n <REPOSITORY-CUSTOM-NAMESPACE>
  2. Re-add the VKS Standard Package Repository to system namespace tkg-system:
    • tanzu package repository add standard-repo --url <REPOSITORY_URL> -n tkg-system
  3. Re-install the package :
    • tanzu 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.

Additional Information