Deploy Jenkins in the Kubernetes cluster
Deploying Jenkins on a Kubernetes cluster can be quite beneficial for managing CI/CD pipelines efficiently. Here's a general guide to get you started:
Prerequisites:
You should have a running Kubernetes cluster.
kubectl
should be configured to connect to your cluster.
Check kubernetes cluster and nodes
kubectl get nodes
Create the Jenkins directory and navigate the directory
mkdir jenkins
cd jenkins
Create a YAML file called jenkins-deployment.yaml with the following content
vi jenkins-deployment.yaml
Expose the Jenkins deployment using a NodePort service:
vi jenkins-service.yaml
Apply the YAML file to create the Jenkins service:
kubectl apply -f jenkins-deployment.yaml
kubectl apply -f jenkins-service.yaml
Check the service's
kubectl get all
To verify if the Jenkins service is running from your terminal, execute the following command:
Access Jenkins:
Access Jenkins using the external IP and NodePort:
Navigate to the NeevCloud panel > Server > Select you node > copy Public_IP
Check Node Port
http://Node_IP: Nodeport
Last updated