Skip to content

Latest commit

 

History

History
60 lines (42 loc) · 1.46 KB

install.md

File metadata and controls

60 lines (42 loc) · 1.46 KB

Include to install Jenkins on Kubernetes cluster and all the manifests.

Install Jenkins

  1. Create Namespace;
  2. Create deployment yaml and deploy it;
  3. Create a service yaml and deploy it;
  4. Access the Jenkins application on a NodePort;
  5. (Optional) Create ingress resource to enable Jenkins portal;

Build Jenkins Master image and deploy it

  1. Build image;
# VERSION='2.176.1'
# DOCKER_IMAGE="richardx/jenkins-master:${VERSION}"
# docker build -t ${DOCKER_IMAGE} -f master/Dockerfile .
#docker push ${DOCKER_IMAGE}

Note: The latest Dockerfile already includes basic initial CasC configuration for Jenkins instance.

  1. Be sure a Persistent Volume is ready;
# kubectl get pv

If missing, create it refering to: pv.yaml (chown 777 /pv)

  1. Create pvc;
# kubectl create -f master/yaml/pvc.yaml
# kubectl get pvc -n jenkins
<it should be in Pending status>

If 'jenkins' namespace missing, create it.

  1. Create deployment, service, and ingress resource;
# kubectl apply -f master/yaml/deployment.yaml
# kubectl apply -f master/yaml/service.yaml
# kubectl apply -f config/ingress.yaml
  1. Additionally, enable jenkins master as NodePort;
# kubectl apply -f master/yaml/service-nodeport.yaml

Build Jenkins Slave image and deploy it (TBD)

Reference Scaling Jenkins on Kubernetes