一、环境介绍
系统:Centos7
Kubeflow版本:0.7.0
Pipeline版本:0.1.31
二、开始
1、正式部署
1)构建centraldashboard容器镜像
见《kubeflow二次开发–centraldashboard build image》
2)修改centraldashboard pod
[root@localhost~]#kubectl edit deployment centraldashboard -n kubeflow
修改镜像版本号,将下面的版本号改成重新build image的新版本号,tag不能改
修改后保存,pod会自动重建,用最新版本image创建容器。
2、临时生效
以下两种方法,就是把改动的文件上传到docker,那么pod重建后就失效了,因为pod重建用的是没有改动的镜像创建的。
1)Kubectl cp
[root@localhost~]# cd /ssd/src/kubeflow-0.7.0/components/centraldashboard/public/assets
[root@localhost assets]# kubectl get pods --all-namespaces
[root@localhost assets]#kubectl cp favicon.ico centraldashboard-c7fd5cb4f-lgz6g:/app/dist/public/assets -n kubeflow
[root@localhost assets]#kubectl cp favicon.ico centraldashboard-c7fd5cb4f-lgz6g:/app/public/assets -n kubeflow
2)docker cp
[root@localhost assets]#docker cp favicon.ico k8s_centraldashboard_centraldashboard-c7fd5cb4f-nvvn6_kubeflow_15226354-f37e-47df-a244-2f656e03ed08_0:/app/public/assets