In this post, let me take you through the steps to install contour package into TKG cluster from TMC Console. If you are looking for detailed steps to deploy TKG cluster on Azure, refer to post. I have already attached the workload cluster (capv-workload) into TMC using TMC CLI. Refer to post to know the steps for attaching workload cluster.
Install cert-manager : Follow the steps here to install cert-manager
Install Contour: Follow the steps here to install Contour
Install Harbor
In TMC Console: Catalog > select cluster capv-workload from drop down and click on Harbor
Click on Install Package which can be found on top right side of the page
Name the Installed package name as : capv-workload-harbor and click NEXT
Package install resources: Leave to Default and click NEXT
Configure values: Provide below values
Note:
Below config is prepared for domain partnerse.workshop.captainvirtualization.in, if you are using a different domain: generate a wildcard certificate and replace the values in below config file.
imageChartStorage used in this config is Azure blob, you can change the same by replacing the values.
cert and keys mentioned below are not completely correct due to security issue, please refrain from using the same.
Note the Load Balancer External IP and make an entry in your local machine ( /etc/hosts ) mapping the IP to partnerse.workshop.captainvirtualization.in or whatever domain you have mentioned in harbor config file.
kubectl get svc -n tanzu-system-ingress --kubeconfig ~/.kube/config-tkg
Access Harbor
Access the url, Enter the credentials as given in harbor config file:
admin, Newstart@1
In Harbor > Create a New project > demo-proj with Access Level as Public
Push an Image to Harbor
Run below commands in the machine from where you would like to authenticate to Harbor registry:
cd /etc/docker/
sudo mkdir certs.d
cd certs.d/
sudo mkdir partnerse.workshop.captainvirtualization.in
cd partnerse.workshop.captainvirtualization.in/
sudo vi ca.crt
Copy below content into crt file and save.
Note: Below config is prepared for domain partnerse.workshop.captainvirtualization.in and is just for reference, if you are using a different domain: provide a different cert file.
# Login to Harbor registry using docker commands in jumpbox
docker login partnerse.workshop.captainvirtualization.in
# Enter the credentials : username – admin , password - Newstart@1
# Once successfully logged in, pull nginx image from public repo
docker pull nginx
# List the images
docker images
# Tag the image
docker tag nginx partnerse.workshop.captainvirtualization.in/demo-proj/nginx-harbor:latest
# List the images
docker images
# Push the image into Harbor repo created earlier
docker push partnerse.workshop.captainvirtualization.in/demo-proj/nginx-harbor
Verify the image in harbor registry > demo-proj repo: