openshift template

来源:互联网 发布:飞猪是淘宝的吗 编辑:程序博客网 时间:2024/06/12 23:05

1、环境准备,上传golang-builder镜像到镜像仓库。
2、镜像导入到image stream中,命令如下:
oc import-image 172.18.141.72:5000/rhscl/golang-builder:latest -n openshift –confirm –insecure
3、原来项目导出模板:

vito@DESKTOP$ oc export bc,dc,svc,secret,is,cm --as-template=template -o json > template.json

删掉不用的资源
4、在新项目中创建模板,需要配置的东西,
ImageStream的spec.tags.from.name
namespace:
DeploymentConfig.spec.triggers.from.namespace
DeploymentConfig.spec.template.spec.containers.image.from.names

原创粉丝点击