美文网首页
harbor使用

harbor使用

作者: 昵称_9eb2 | 来源:发表于2020-12-17 10:57 被阅读0次

登录

docker login -u USERNAME -p PASSWORD IP

查询镜像

docker search IP/FOLDER

获取镜像

docker pull REPO_URI # 可以到harbor后台查看URI,和github类似

上传镜像

docker commit 73f978a63402 test_python3:v1  # commit修改后的docker运行实例
docker tag test_python3:v1 reg.test.k8s/test_base_image/test_python3:v1  # 打上标签
docker push # 推送
或者
docker commit 73f978a63402 reg.test.k8s/test_base_image/test_python3:v1
docker push

k8s 使用私有harbor

# 若是配置了docker代理,一定记得注释掉
1. k8s配置harbor登录凭证
https://kubernetes.io/zh/docs/tasks/configure-pod-container/pull-image-private-registry/
2. deployment.yaml 添加凭证
imagePullSecrets:
      - name: regcred

相关文章

网友评论

      本文标题:harbor使用

      本文链接:https://www.haomeiwen.com/subject/ozoagktx.html