helm3如何安装harbor

发布时间:2021-11-16 11:46:53 作者:小新
来源:亿速云 阅读:311

这篇文章给大家分享的是有关helm3如何安装harbor的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。

1、下载并修改

helm repo add harbor https://helm.goharbor.io

helm pull harbor/harbor --version 1.2.3

修改values.yaml文件

helm3如何安装harborhelm3如何安装harbor

helm3如何安装harbor

2、安装

helm install harbor ./harbor
Error: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "Deployment" in version "extensions/v1beta1"

由于我是最新版的k8s集群,所以不支持version "extensions/v1beta1",下面修改版本为apps

grep -irl "extensions/v1beta1" harbor | grep deployment

grep -irl "extensions/v1beta1" harbor | grep deploy | xargs sed -i 's#extensions/v1beta1#apps/v1#g'

再次执行安装

helm3如何安装harbor

服务需要请求pv,所以这里我们使用hostPath来创建pv

apiVersion: v1
kind: PersistentVolume
metadata:
  name: harbor-pv1
spec: 
capacity:
    storage: 10Gi
  volumeMode: Filesystem
  accessModes:
  -  ReadWriteOnce
  persistentVolumeReclaimPolicy: Retain
  hostPath:
    path: /helm/harbor/pv1

helm3如何安装harbor

3、访问web界面

helm3如何安装harbor

helm3如何安装harbor

使用用户密码登录胡发现登录不了。我们查看pod日志会发现

helm3如何安装harbor

kubectl logs harbor-harbor-registry-6f7765fd94-kxt74 
Error from server (BadRequest): a container name must be specified for pod harbor-harbor-registry-6f7765fd94-kxt74, choose one of: [registry registryctl]

helm3如何安装harbor

由于容器中名字重复,修改为一致即可。

kubectl logs harbor-harbor-redis-0
1:M 18 Dec 02:00:08.032 * 10 changes in 300 seconds. Saving...
1:M 18 Dec 02:00:08.033 * Background saving started by pid 97
97:C 18 Dec 02:00:08.033 # Failed opening the RDB file dump.rdb (in server root dir /var/lib/redis) for saving: Permission denied
1:M 18 Dec 02:00:08.133 # Background saving error

由于redis请求的pv权限不够

 kubectl get pvc   #查看绑定的pv是主机的路径,然后给与777的权限即可

 chmod 777 /helm/harbor/pv4/

helm3如何安装harbor

kubectl logs harbor-harbor-clair-c9757f6cb-9x8nr
{"Event":"could not download Oracle's update list","Level":"error","Location":"oracle.go:162","Time":"2019-12-18 01:54:54.608195","error":"Get https://linux.oracle.com/oval/com.oracle.elsa-
20161292.xml: read tcp 10.244.2.34:35278-\u003e23.63.35.142:443: read: connection reset by peer"}
{"Event":"an error occured when fetching update","Level":"error","Location":"updater.go:246","Time":"2019-12-18 01:54:54.609261","error":"could not download requested resource","updater 
name":"oracle"}

将pod删除,自动生成即可

helm3如何安装harbor

再次根据设置的密码登录,我这里是admin/admin12345

helm3如何安装harbor

感谢各位的阅读!关于“helm3如何安装harbor”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!

推荐阅读:
  1. Docker安装部署Harbor教程
  2. harbor的安装和部署

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

harbor helm3

上一篇:怎么使用kubeadm安装kubernetes 1.13高可用集群

下一篇:如何理解mysql5.6版本的致命点以及两表关联的字段类型相同的重要性

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》