相關環境(部署安裝略。。。):
jenkins 安裝
k8s 集羣環境部署
docker 私有倉庫搭建
jenkins 創建項目 Execute shell 構建docker鏡像上傳到私有倉庫,以構建時間做版本命名;
dockerfile 內容:
使用SSH Publishers 插件登錄到k8s-master主機上 更新項目
tomcat-deployment.yaml 內容
tomcat-service.yaml 內容
deployment 設置啓動的是3個pods 在 kubernetes Dashboard查看成功啓動3個tomcat