Jenkins image with the ability to connecto to Kubernetes to run build jobs.
3.2K
After 3 commands Jenkins will execute sample pipeline jobs on a Kubernetes cluster.
Follow this to install a microk8s kubernetes cluster on your laptop and optionally other nodes.
These are the 3 commands to run both the Jenkins master and the workers on a (possibly) distributed Kubernetes cluster.
git clone https://github.com/devops4me/docker-jenkins.git
cd docker-jenkins
kubectl apply -f jenkins-deployment.yaml
That's it. Your Kubernetes orchestrated Jenkins cluster is ready.
The sample jobs include
kubectl get services -o wide
kubectl -n default logs -f deployment/jenkins --all-containers=true --since=5m
watch kubectl get pods -o wide
Visit the Jenkins UI with the IP address against the Jenkins service. Go to the jobs, click Build Now and then watch both the logs and the pods showing Kubernetes running dockerized pipelines on one or more nodes.
To view or change how the Kubernetes plugin configuration go to Jenkins | Manage Jenkins | Configure System and scroll down to the clouds section. The default configuration assumes
https://kubernetes.default.svc from inside the clusterhttp://jenkins as jenkins is the service namedefault Kubernetes namespaceThis sample Java microservice shows how the Jenkinsfile and the pod-template yaml are written to fascilitate execution on a Kubernetes platform.
Content type
Image
Digest
Size
587.4 MB
Last updated
about 5 years ago
docker pull devops4me/jenkins