Harbor is an open-source container registry that is designed to work with a variety of container orchestration platforms, including VMware Tanzu. In other words, it’s a pre-packaged set of files and configurations that allows software to run consistently and reliably across different computing environments. Harbor is a popular open-source container registry that allows developers to store, manage, and distribute their container images, including Docker images.
Harbor can be integrated with Tanzu to provide a secure, scalable, and easy-to-use container registry that is optimized for use with Kubernetes.
Harbor can be installed as a standalone service or as part of the VMware Tanzu Kubernetes Grid Integrated Edition (TKGI) platform, which is a Kubernetes distribution that is optimized for use with VMware infrastructure.
Below is a list of commands to get you started on VMware Harbor Images. These were extremely useful to me, and I hope that you find them useful too!
/root/Tanzu/harbor_image.yaml (sample yaml file for harbor image)
apiVersion: apps/v1
kind: Deployment
metadata:
name: nextlevel-deployment
labels:
app: nextlevel
spec:
replicas: 1
selector:
matchLabels:
app: nextlevel
template:
metadata:
labels:
app: nextlevel
spec:
containers:
- name: nextlevel
image: 192.168.30.35/namespace-01/nextlevel:1.0
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: nextlevel-lb
spec:
selector:
app: nextlevel
ports:
- port: 80
targetPort: 80
type: LoadBalancer
Apply this YAML file to deploy the application and service.
# kubectl apply -f /root/Tanzu/harbor_image.yaml
Get the external IP of this new deployment by listing the Kubernetes services.
# kubectl get services
Disclaimer: “I am a member of the Tanzu Vanguard community. As an active member, I am passionate about Tanzu and its offerings and willingly share my knowledge and experience with the world. I am not a representative of VMware. My views are my own. If you’d like to learn more about Tanzu Vanguard, please visit https://tanzu.vmware.com/vanguard”