容器化应用: Minishift 搭建镜像仓库的可视化管理控制台
文章目录
配置过程
下载应用模板
curl -O https://raw.githubusercontent.com/openshift/openshift-ansible/master/roles/openshift_hosted_templates/files/v3.7/origin/registry-console.yaml
使用模板创建服务
oc create -n default -f registry-console.yaml
切换项目(名称空间)
oc project default
创建应用
oc new-app -n default --template=registry-console \
--param OPENSHIFT_OAUTH_PROVIDER_URL="https://192.168.99.100:8443" \
--param REGISTRY_HOST=docker-registry-default.192.168.99.100.nip.io \
--param COCKPIT_KUBE_URL=https://registry-console-default.192.168.99.100.nip.io
参数问题:
warning: --param no longer accepts comma-separated lists of values.
https://github.com/openshift/...
新版本的OC命令不再支持逗号分隔的参数, 每一组键值对参数都必须使用-p或--param
执行后会拉取 cockpit/kubernetes:latest 镜像, 这个过程需要一点时间. 我们可以在监控里面看到事件:
Web console 是看不到一些内置的项目的, 要想以developer用户查看所有项目, 执行:
oc adm policy add-cluster-role-to-user cluster-admin developer赋予 developer 集群管理员权限.
添加路由
oc create route passthrough --service registry-console --hostname registry-console-default.192.168.99.100.nip.io -n default
如上图, 添加路由后, 我们在default >> Services看到了创建的路由规则.
最后浏览器中输入 https://registry-console-defa... 进入 Registry Console 管理控制台
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论