安装步骤
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| [root@exxk ~]# helm repo add harbor https://helm.goharbor.io
[root@exxk ~]# helm fetch harbor/harbor --untar [root@exxk ~]# cd harbor/ [root@exxk harbor]# ls Chart.yaml LICENSE README.md templates values.yaml
1. 创建nfs,参考https://www.iexxk.com/2022/07/26/k8s-nfs/?highlight=nfs#%E5%88%9B%E5%BB%BAnfs%E6%9C%8D%E5%8A%A1 2. 创建 StorageClass .... kind: StorageClass metadata: annotations: k8s.kuboard.cn/storageType: nfs_client_provisioner name: nfs-172.16.30.165 reclaimPolicy: Delete volumeBindingMode: Immediate
[root@exxk harbor]# kubectl create namespace harbor
[root@exxk harbor]# helm install my-harbor . -n harbor NAME: my-harbor LAST DEPLOYED: Wed Sep 27 14:47:16 2023 NAMESPACE: default STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: Please wait for several minutes for Harbor deployment to complete. Then you should be able to visit the Harbor portal at https://core.harbor.domain For more details, please visit https://github.com/goharbor/harbor
[root@exxk ~]# helm uninstall my-harbor -n harbor
|
通过harbor.iexxk.io进行访问,注意进行域名映射,默认登录用户名密码admin/Harbor12345
问题
登录输入正确密码也提示密码错误
1 2 3 4 5 6 7 8
| Request URL: http://harbor.iexxk.io/c/login Request Method: POST Status Code: 403 Forbidden 接口返回 {"errors":[{"code":"FORBIDDEN","message":"CSRF token invalid"}]}
|
解决:修改externalURL: https://core.harbor.domain为自己实际的访问地址`harbor.iexxk.io`