容器化应用: Minishift 搭建镜像仓库的可视化管理控制台

配置过程

下载应用模板html

curl -O https://raw.githubusercontent.com/openshift/openshift-ansible/master/roles/openshift_hosted_templates/files/v3.7/origin/registry-console.yaml

使用模板建立服务git

oc create -n default -f registry-console.yaml

切换项目(名称空间)github

oc project default

建立应用docker

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--paramapp

执行后会拉取 cockpit/kubernetes:latest 镜像, 这个过程须要一点时间. 咱们能够在监控里面看到事件:curl

clipboard.png

Web console 是看不到一些内置的项目的, 要想以developer用户查看全部项目, 执行: oc adm policy add-cluster-role-to-user cluster-admin developer 赋予 developer 集群管理员权限.post

添加路由url

oc create route passthrough --service registry-console --hostname registry-console-default.192.168.99.100.nip.io -n default

clipboard.png

如上图, 添加路由后, 咱们在default >> Services看到了建立的路由规则.spa

最后浏览器中输入 https://registry-console-defa... 进入 Registry Console 管理控制台

clipboard.png

参考资料

相关文章
相关标签/搜索