top of page
  • Writer's pictureNikhil Verma

Build Jenkins Pipeline Using Git, Docker Hub, Podman and Kubernetes - Part 3

In this section we will do Jenkins configuration, Install all required plugins and integrated with Kubernetes.

From Part1 , we have already installed Jenkins using Terraform :

Let's set OPC and Root credentials :

Enter your intial admin password :

Install Plugins as per your requirement :

Post Installation setup your Admin password :

Make sure Kubernetes plugin installed :

Configure Security settings for agent communication :

Before Kubernetes configuration we need to create service account in Kubernetes , set appropriate permissions and bind role.

  • kubectl create serviceaccount jenkins

  • kubectl create clusterrole deployer --verb=get,list,watch,create,delete,patch,update --resource=deployments,pods,services

  • kubectl create clusterrolebinding deployer-srvacct-default-binding --clusterrole=deployer --serviceaccount=default:jenkins

Let's create secret for this service account :

apiVersion: v1
kind: Secret
 name: sa-secret
 annotations: “jenkins”

Let's use this for configuring Kubernetes in Jenkins

Click Test connection , make sure you are connected.

Remaining Options set it default.

Next we need to add DockerHub and GitHub account in Jenkins:

Git Account creation with Username and password.

Now our Jenkins integrated with Kubernetes , Next blog we will do Pipeline deployment.

38 views0 comments


bottom of page