# spring-boot-k8s-demo **Repository Path**: jobob/spring-boot-k8s-demo ## Basic Information - **Project Name**: spring-boot-k8s-demo - **Description**: SpringBoot Gradle Jenkins Helm Harbor Kubernetes - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 3 - **Created**: 2020-04-14 - **Last Updated**: 2021-09-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README * 主要涉及相关技术点: SpringBoot Gradle Jenkins Helm Harbor Kubernetes # 部署 Docker ``` # 授权 chmod +x gradlew # 编译 ./gradlew build docker -x test ``` # 推送 Harbor ``` # 登录 docker login -u test -p Qw123qwe https://192.168.0.181 # 镜像 tag docker tag [IMAGE ID] 192.168.0.181/test/spring-boot-k8s-demo:1.0 # 上传 docker push 192.168.0.181/test/spring-boot-k8s-demo:1.0 ``` # 使用 Harbor 镜像 ``` # 登录 docker login -u test -p Qw123qwe https://192.168.0.181 # 下载 docker pull 192.168.0.181/test/spring-boot-k8s-demo:1.0 # 宿主运行,控制台关闭自动退出 docker run -p 8080:8080 -t 192.168.0.181/test/spring-boot-k8s-demo:1.0 # 创建 JDK 软连接 ln -s /usr/java/jdk1.8.0_241-amd64 /usr/java/jdk1.8 # 共享宿主 usr 目录 jdk 环境运行 docker run -p 8080:8080 -v /usr:/usr -t spring-boot-k8s-demo:1.0 # 后台运行 docker run -d -p 8080:8080 -t 192.168.0.181/test/spring-boot-k8s-demo:1.0 ```