Include to install Jenkins on Kubernetes cluster and all the manifests.
- Create Namespace;
- Create deployment yaml and deploy it;
- Create a service yaml and deploy it;
- Access the Jenkins application on a NodePort;
- (Optional) Create ingress resource to enable Jenkins portal;
- 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 already includes basic initial CasC configuration for Jenkins instance.
- Be sure a Persistent Volume is ready;
# kubectl get pv
If missing, create it refering to: (chown 777 /pv)
- 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.
- 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
- Additionally, enable jenkins master as NodePort;
# kubectl apply -f master/yaml/service-nodeport.yaml