A basic continue integration/deployment project that build, release and deploy a static app in a kubernetes cluster (minikube) via jenkins.
- Dockerhub account created Dockerhub
- Docker-compose installed docker
- Docker desktop (MAC or WINDOW) docker
Clone project
git clone https://github.com/evandjefie/cicd-k8s.git
cd cicd-k8s
Launch jenkins server
docker-compose up -d
Get secret from logs to Login to jenkins server
docker-compose logs
Command output
ci-jenkins | Jenkins initial setup is required. An admin user has been created and a password generated.
ci-jenkins | Please use the following password to proceed to installation:
ci-jenkins |
ci-jenkins | secret_locate_here
ci-jenkins |
ci-jenkins | This may also be found at: /var/jenkins_home/secrets/initialAdminPassword
ci-jenkins |
ci-jenkins | *************************************************************
Connect to http://localhost:8081
-
Install docker and kubernetes Plugin
- Go to Dashboard>Administer Jenkins>plugins
- or http://localhost:8081/manage/pluginManager/
-
Create DockerHub Credential and Secret file(Kubeconfig)
- Go to Dashboard>Administer Jenkins>Identifiers>System>Global identifiers (unlimited)
- or http://localhost:8081/manage/credentials/
-
Create Cloud agent for docker and minikube
- Go to Dashboard>Administer Jenkins>Cloud
- or http://localhost:8081/manage/clouds/
-
Create Job
-
Copy Jenkinsfile
- in your app repository
- or in your created job