1.查看当前线上的项目页面
目前线上发布了springboot项目的hello 斑马并且线上的有两个pod 查看下app namespace名称空间的pods
2.gitee修改源代码并提交至master分支
3.项目构建并推送到harbor私用仓库中
3.1 jenkins 自动发布构建项目
3.2 手动发布项目方案
进入jenkins 容器中
root@jenkins-54b8469cf9-swr9p:~# git clone https://gitee.com/ssebank/dubbo-demo-web.git
root@jenkins-54b8469cf9-swr9p:~/dubbo-demo-web# /var/jenkins_home/maven-3.6.1-8u232/bin/mvn clean package -Dmaven.test.skip=true
root@jenkins-54b8469cf9-swr9p:~/dubbo-demo-web/dubbo-client/target# pwd
/root/dubbo-demo-web/dubbo-client/target
root@jenkins-54b8469cf9-swr9p:~/dubbo-demo-web/dubbo-client/target# mkdir project_dir
root@jenkins-54b8469cf9-swr9p:~/dubbo-demo-web/dubbo-client/target# mv *.jar ./project_dir
root@jenkins-54b8469cf9-swr9p:~/dubbo-demo-web/# echo "FROM harbor.od.com/base/jre8:8u112" >>Dockerfile
root@jenkins-54b8469cf9-swr9p:~/dubbo-demo-web/# echo "ADD ./dubbo-client/target/project_dir /opt/project_dir" >>Dockerfile
root@jenkins-54b8469cf9-swr9p:~/dubbo-demo-web/dubbo-client/target# docker build -t harbor.od.com/app/dubbo-demo-consumer:master_V2hangzhou .
- 针对pod进行发布杭州页面
[root@hdss7-22 data]# kubectl logs -f dubbo-demo-consumer-6fdf554f7d-lgn5r -n app
另外一个pods的状态为