This section provides instructions for installing standard packages on TKG clusters provisioned with TKr for vSphere 7.x.
Requirements
These instructions are validated with TKr v1.27.10 for vSphere 7.0.3.6 and TKr v1.27.10 for vSphere 8.0.1.1. At the time of publication, this was the most recently available TKr for vSphere 7.x. TKrs for vSphere 7.x can run on vSphere 8.x for the purpose of upgrading from vSphere 7.x to vSphere 8.x.
Adhere to the following prerequisites:
- Workload Management enabled
- Supervisor deployed
- vSphere Namespace created
See Create a vSphere Namespace for Hosting TKG Service Clusters.
- Linux client with Kubernetes CLI Tools for vSphere installed
Note: If you are using a TKG cluster provisioned with a TKr for vSphere 8.x, refer to the following documentation for standard package installation instructions:
Installing Standard Packages on a TKG Cluster Using TKr for vSphere 8.x. For more information about TKr versions, see the
release notes.
Create TKG Cluster
Create a TKG cluster for hosting standard packages.
- Create a TKG cluster.
See Workflow for Provisioning TKG Clusters Using Kubectl.
Example cluster specification for the Photon edition of TKr v1.27.10.apiVersion: run.tanzu.vmware.com/v1alpha3 kind: TanzuKubernetesCluster metadata: name: tkgs-cluster-photon namespace: tkgs-ns spec: topology: controlPlane: replicas: 3 vmClass: guaranteed-medium storageClass: vsan-esa-default-policy-raid5 tkr: reference: name: v1.27.10---vmware.1-fips.1-tkg.1 #TKR for v7 nodePools: - name: worker replicas: 3 vmClass: guaranteed-medium storageClass: vsan-esa-default-policy-raid5 settings: storage: defaultClass: vsan-esa-default-policy-raid5
Example cluster specification for the Ubuntu edition of TKr v1.27.10.apiVersion: run.tanzu.vmware.com/v1alpha3 kind: TanzuKubernetesCluster metadata: name: tkgs-cluster-ubuntu namespace: tkgs-ns annotations: run.tanzu.vmware.com/resolve-os-image: os-name=ubuntu spec: topology: controlPlane: replicas: 3 vmClass: guaranteed-medium storageClass: vsan-esa-default-policy-raid5 tkr: reference: name: v1.27.10---vmware.1-fips.1-tkg.1.ubuntu #TKR for v7 nodePools: - name: worker replicas: 3 vmClass: guaranteed-medium storageClass: vsan-esa-default-policy-raid5 settings: storage: defaultClass: vsan-esa-default-policy-raid5
Install Carvel Package Manager
Install the Carvel package manager.
- Log in to the TKG cluster.
kubectl vsphere login --server=IP-or-FQDN --vsphere-username USER@vsphere.local --tanzu-kubernetes-cluster-name tkgs-cluster-photon --tanzu-kubernetes-cluster-namespace tkgs-ns
- Install Carvel package manager.
wget -O- https://carvel.dev/install.sh > install.sh
sed -i 's/wget -nv -O-/wget --no-check-certificate -nv -O-/' install.sh
sudo bash install.sh
- Verify installation.
imgpkg version
Install Kapp Controller
Add a Package Repository
Add the desired package repository version.
- List the latest repository tag.
imgpkg tag list -i projects.registry.vmware.com/tkg/packages/standard/repo
- Create
packagerepo.yaml
.Update the repository version to match the target version.apiVersion: packaging.carvel.dev/v1alpha1 kind: PackageRepository metadata: name: tanzu-standard namespace: tkg-system spec: fetch: imgpkgBundle: image: projects.registry.vmware.com/tkg/packages/standard/repo:v2024.2.1
- Install the package repository.
kubectl apply -f packagerepo.yaml
Expected result:packagerepository.packaging.carvel.dev/tanzu-standard created
- Verify the package repository.
kubectl get packagerepositories -A
Expected result:NAMESPACE NAME AGE DESCRIPTION tkg-system tanzu-standard 3m9s Reconcile succeeded