Preparing Workload Cluster for standard Tanzu packages (Harbor, Prometheus, etc.)
Documentation: https://docs.vmware.com/en/VMware-Tanzu-Kubernetes-Grid/1.6/vmware-tanzu-kubernetes-grid-16/GUID-packages-prep-tkgs-kapp.html
Step 1) Create workload cluster
Step 2) Install kapp-controller
Step 3) Install cert-manager
Step 4) Implement ingress control with Contour
Step 5) Deploy Harbor
Step 1) Create workload cluster
Use standard procedure to deploy new workload cluster using YAML file.
Step 2) Install kapp-controller (documentation link) - this enables Tanzu package repository to function
1) Install kapp-controller
Use the delivered YAML files from documentation to deploy kapp controller, update fields as needed ,etc. name: tanzu-package-repo-global
-
kubectl apply -f tanzu-system-kapp-ctrl-restricted.yaml
-
kubectl apply -f kapp-controller.yaml
-
kubectl get pods -n tkg-system | grep kapp-controller
2) Add standard packages repository (note namespace: tanzu-package-repo-global)
tanzu package repository add tanzu-standard -n tanzu-package-repo-global --url projects.registry.vmware.com/tkg/packages/standard/repo:v1.6.1
3) Verify repository was added
tanzu package repository list -n tanzu-package-repo-global
4) List packages
tanzu package available list -n tanzu-package-repo-global
Step 3) Install cert-manager (documentation link) (note namespace: tanzu-package-repo-global)
tanzu package install cert-manager --package-name cert-manager.tanzu.vmware.com --namespace tanzu-package-repo-global --version 1.7.2+vmware.1-tkg.1 --create-namespace
Step 4) Implement ingress control with Contour (documentation link) (note namespace tanzu-package-repo-global)
Generate YAML files following documentation:
tanzu package available get contour.tanzu.vmware.com/1.20.2+vmware.2-tkg.1 --generate-default-values-file
Modify YAML file as needed: type: LoadBalancer
Install the package:
tanzu package install contour \
--package-name contour.tanzu.vmware.com \
--version 1.20.2+vmware.2-tkg.1 \
--values-file contour-default-values.yaml \
--namespace tanzu-package-repo-global
Verify packages are installed
k get apps -A
NAMESPACE NAME DESCRIPTION SINCE-DEPLOY AGE
tanzu-package-repo-global cert-manager Reconcile succeeded 8m18s 50m
tanzu-package-repo-global contour Reconcile succeeded 6m21s 6m30s
Step 5) Deploy harbor (documentation link) (note namespace tanzu-package-repo-global)
Generate YAML file from documentation link then modify values as needed
Install the package:
tanzu package install harbor \
--package-name harbor.tanzu.vmware.com \
--version 2.6.1+vmware.1-tkg.1 \
--values-file harbor-default-values.yaml \
--namespace tanzu-package-repo-global
Verify packages are installed
k get apps -A
NAMESPACE NAME DESCRIPTION SINCE-DEPLOY AGE
tanzu-package-repo-global cert-manager Reconcile succeeded 6m8s 99m
tanzu-package-repo-global contour Reconcile succeeded 3m32s 55m
tanzu-package-repo-global harbor Reconcile succeeded 2m38s 2m45s
Obtain IP address for Harbor User Interface
kubectl get svc envoy -n tanzu-system-ingress -o jsonpath='{.status.loadBalancer.ingress[0]}'
Update TKG DNS Zone
Harbor LDAP Settings: