Error: failed get cert manager components: failed to list api resources: action failed after 9 attempts: unable to retrieve the complete list of server APIs: data.packaging.carvel.dev/v1alpha1: the server is currently unable to handle the request.
root@<hostname>:~/cluster-upgrade-script# kubectl get pkgi -A
E1121 12:34:00.433751 248607 memcache.go:287] "Unhandled Error" err="couldn't get resource list for data.packaging.carvel.dev/v1alpha1: the server is currently unable to handle the request"
E1121 12:34:00.439855 248607 memcache.go:121] "Unhandled Error" err="couldn't get resource list for data.packaging.carvel.dev/v1alpha1: the server is currently unable to handle the request"
E1121 12:34:00.446123 248607 memcache.go:121] "Unhandled Error" err="couldn't get resource list for data.packaging.carvel.dev/v1alpha1: the server is currently unable to handle the request"
E1121 12:34:00.452623 248607 memcache.go:121] "Unhandled Error" err="couldn't get resource list for data.packaging.carvel.dev/v1alpha1: the server is currently unable to handle the request"
NAMESPACE NAME PACKAGE NAME PACKAGE VERSION DESCRIPTION AGE
tkg-system antrea antrea.tanzu.vmware.com 1.9.0+vmware.2-tkg.1-advanced Reconcile failed: the server is currently unable to handle the request (get pack... 400d
tkg-system metrics-server metrics-server.tanzu.vmware.com 0.6.2+vmware.1-tkg.2 Reconcile failed: the server is currently unable to handle the request (get pack... 400d
tkg-system secretgen-controller secretgen-controller.tanzu.vmware.com 0.11.2+vmware.1-tkg.3 Reconcile failed: the server is currently unable to handle the request (get pack... 400dVMware Container Service Extension 4.2.3
VMware Cloud Director 10.6.1.x
The certificate of the packaging APIService has expired. In this case it is "v1alpha1.data.packaging.carvel.dev". The issuer of these certificates is the kapp-controller. The kapp-controller pod is responsible for management and reconciling of installed packages in a cluster. If there is an issue with the kapp-controller pod within the cluster then ./upgrade_cluster_components.sh cannot progress.
To confirm the same, run the below command:
kubectl get apiservice v1alpha1.data.packaging.carvel.dev
-o jsonpath='{.spec.caBundle}' | base64 -d | openssl x509 -text -noout
The certificate can be renewed on restart of kapp-controller pod as follows:
"More -> Kubernetes Container Cluster."Download Kube Config" action.kubectl and access to the TKG Cluster Endpoint (Load Balancer VIP).export KUBECONFIG="/root/kubeconfig<cluster-name>.conf"kubectl get pods -Akubectl get apiservice v1alpha1.data.packaging.carvel.dev
-o jsonpath='{.spec.caBundle}' | base64 -d | openssl x509 -text -nooutkubectl -n kapp-controller get podskubectl -n kapp-controller delete pod kapp-controller-<pod-id-from-step-3-output>kubectl get apiservice v1alpha1.data.packaging.carvel.dev -o jsonpath='{.spec.caBundle}' | base64 -d | openssl x509 -text -noout