TKG 2.1 upgrade to TKG 2.2 fails when searching for 1.25.7 Tanzu Kubernetes Release on Air Gapped environment
book
Article ID: 326387
calendar_today
Updated On:
Products
Tanzu Kubernetes Grid
Show More
Show Less
Issue/Introduction
Symptoms:
When upgrading TKGm 2.1 to TKG 2.2 the procedure fails with an error: could not resolve TKR/OSImage for controlPlane, machineDeployments: [md-0 md-1 md-2], query: {controlPlane: {k8sVersionPrefix: 'v1.25.7+vmware.2-tkg.1', tkrSelector: '', osImageSelector: 'image-type=ova,os-name=ubuntu'}, machineDeployments: [{k8sVersionPrefix: 'v1.25.7+vmware.2-tkg.1', tkrSelector: '', osImageSelector: 'image-type=ova,os-name=ubuntu'} {k8sVersionPrefix: 'v1.25.7+vmware.2-tkg.1', tkrSelector: '', osImageSelector: 'image-type=ova,os-name=ubuntu'} {k8sVersionPrefix: 'v1.25.7+vmware.2-tkg.1', tkrSelector: '', osImageSelector: 'image-type=ova,os-name=ubuntu'}]}, result: {controlPlane: {k8sVersion: '', tkrName: '', osImagesByTKR: map[]}, machineDeployments: [{k8sVersion: '', tkrName: '', osImagesByTKR: map[]} {k8sVersion: '', tkrName: '', osImagesByTKR: map[]} {k8sVersion: '', tkrName: '', osImagesByTKR: map[]}]}", "UID": "4b7051a0-f655-45c9-b1f1-336bbae5da54", "allowed": false}
Running kubectl get tkr does not list the new TKRs for TKGm 2.2, and the upgrade cannot proceed.
Environment
VMware Tanzu Kubernetes Grid 2.1.1 VMware Tanzu Kubernetes Grid 2.4.0 VMware Tanzu Kubernetes Grid 2.3.0
Cause
The tkr-source-controller do not find the tkr-vsphere-nonparavirt-v1.25.7_vmware.2-tkg.1 and tkg-vsphere-repository-nonparavir-1.25.7_vmware.2-tkg.1 package on Harbor
Resolution
Upload the missing packages manually using imgpkg to Harbor. Workaround:
Follow these steps when uploading the bundle to the private Harbor (as stated in the Prepare an Internet-Restricted Environment page):
Check if the tkr-vsphere-nonparavirt-v1.25.7_vmware.2-tkg.1 and tkg-vsphere-repository-nonparavir-1.25.7_vmware.2-tkg.1 packages exist in the private Harbor repository. Follow the air gap procedure to download the bundle locally using tanzu isolated-cluster download-bundle --tkg-version v2.2.0 command. Upload the bundle using tanzu isolated-cluster upload-bundle --destination-repo <private-harbor> to your private Harbor. Copy the leftover packages manually using imgpkg :
imgpkg copy --tar ${source_dir}/tkr-vsphere-nonparavirt-v1.25.7_vmware.2-tkg.1.tar --to-repo <remote-harbor-url>/tkr-vsphere-nonparavirt --registry-ca-cert-path ${harbor-cert-path}/ca.crt imgpkg copy --tar ${source_dir}/tkr-repository-vsphere-nonparavirt-v1.25.7_vmware.2.tar --to-repo <remote-harbor-url>/tkr-repository-vsphere-nonparavirt --registry-ca-cert-path ${harbor-cert-path}/ca.crt
Feedback
thumb_up
Yes
thumb_down
No