#helm add repo
helm repo add harbor https://helm.goharbor.io
##install
[root@rke-dev harbor]# cat harbor-namespace.yaml apiVersion: v1 kind: Namespace metadata: name: harbor labels: name: harbor kubectl apply -f harbor-namespace.yaml helm pull harbor/harbor helm install k8s-harbor harbor/harbor -f harbor/values.yaml -n harbor
開啟ingress的網址
https://core.harbor.domain/
預設帳密
admin / Harbor12345
k8s 加入harbor images下載權限
vi harbor.sh
kubectl create secret docker-registry harborsecret \
--docker-server=harbor.itnotetk.com \
--docker-username=admin \
--docker-password=your harbor password
secret/harborsecret created
在deployment spec加入以下
imagePullSecrets:
- name: harborsecret
#移除
helm uninstall k8s-harbor -n harbor
Hits: 65