https://github.com/dashrathmundkar/cicd-java-maven-project
This is simple java-maven project for cicd environment the purpose of project is to how to ship application from development to kubernetes environment using CICD.
https://github.com/dashrathmundkar/cicd-java-maven-project
cicd docker java java-8 jenkins jenkins-pipeline jenkinsfile kubernetes maven open-source sonarqube spring-boot
Last synced: about 1 year ago
JSON representation
This is simple java-maven project for cicd environment the purpose of project is to how to ship application from development to kubernetes environment using CICD.
- Host: GitHub
- URL: https://github.com/dashrathmundkar/cicd-java-maven-project
- Owner: DashrathMundkar
- License: apache-2.0
- Created: 2022-03-19T16:59:10.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-05T08:22:38.000Z (over 1 year ago)
- Last Synced: 2025-04-19T12:44:29.223Z (about 1 year ago)
- Topics: cicd, docker, java, java-8, jenkins, jenkins-pipeline, jenkinsfile, kubernetes, maven, open-source, sonarqube, spring-boot
- Language: Java
- Homepage:
- Size: 14.7 MB
- Stars: 1
- Watchers: 1
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
    
# cicd-java-maven-project
This is very basic/simple java-maven project for cicd environment and the purpose of the project is to showcase how to ship application from development to kubernetes environment using CICD.
## Build and deploy locally using docker
1. ```mvn clean install```
3. ```docker build -t hello-world .```
4. ```docker run -d -p 8080:8080 --name hello-world hello-world```
5. Access the application on ```localhost:8080```
## How to deploy on Kubernetes
1. First create namesapce by applying yaml file ```kubectl apply -f kubernetes/namespace.yaml```
3. Then apply rest of the files from kubernetes folder using ```kubectl apply -f kubernetes/```
4. Now check if everything is up and running on our namespace using ```kubectl get all -n cicd-java-maven```
5. And make sure our application pod is up and running ```kubectl get pods -n cicd-java-maven```
### Ok, but how to access the application over browser ????
I assume you have either ```docker dekstop``` or ```kind cluster``` or ```minikube```
1. We need to deploy the ingress-controller for that by applying the yaml file from this official documentation
```kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.2/deploy/static/provider/cloud/deploy.yaml```
2. Check everything is up and running on ```kubectl get all -n ingress-nginx``` if everything is up and running then we are good to go.
3. Now edit your hosts file from this location on Windows ```C:\Windows\System32\drivers\etc\hosts``` and on Mac/Linux ```sudo vim /etc/hosts``` and add the entry in it ```127.0.0.1 exmaple-test.com```
4. Access the application on browser ```exmaple-test.com``` now you should see our awesome project text.
```If you like and want to extend our awesome application then please feel free to contribute :) ```