Home > front end >  Running Minikube Cluster as Jenkins Agent
Running Minikube Cluster as Jenkins Agent

Time:09-03

I have a container instance: jenkins, and kubernetes cluster: minikube both running on my local machine. I can't figure out a way to integrate minikube in jenkins. Below is how i set things up.

Setup Minikube
    - minikube start
    - replace cert and key values in .kube/config with hardcoded data

Setup Jenkins 
    - docker run --name jenkins -v jenkins_home:/var/jenkins_home -d -p 8080:8080 -p 50000:50000 --network minikube jenkins/jenkins:lts

Integrate Kubernetes in Jenkins 
    - install kubernetes plugin 
    - configure cloud -> add a new cloud -> kubernetes -> kubernetes cloud details  
        - create credential: secret file, use the file with .kube/config
        - click test connection -> Error testing connection : java.net.ConnectException: Failed to connect to /127.0.0.1:{port}

I've been stuck with this problem for a few good days and it's driving me insane. My jenkins instance is already running in the same network with the minikube.

problem-screenshot

CodePudding user response:

Never mind having a separate container for jenkins, it's extremely complex.

Just install jenkins through helm charts.

CodePudding user response:

OP was able to use Helmchart to install Jenkins. Using helm chart makes it easier to install as well as manage application deployed on kubernetes.

  • Related