Join us

Deploy to GKE Cluster from Jenkins

1_tGI3umgdq-9fd_7gh2f5rg.png

In this article we would revisit to see:

- Pre-requisites to configure on the kubernetes cluster deployed on GKE to connect from Jenkins

- Configuration/Plugins Required on the Jenkins

- How we can execute the simple manifest file ( Kind: Deployment/ Pod)

Step 1:

1.1. Setup the necessary environment variables

1.2. Create a service account using the Google Cloud SDK , this is the service account that is used when you login into your cluster on the GCP. Alternatively you can also create a new SA different from your default login as provide necessary roles.

1.3. Creation of Custom IAM Role with minimum permissions

1.5. Download the key , this is required to be uploaded in the Jenkins Google Kubernetes Plugin to connect to the GKE Cluster

Step2 : There are various plugins provided to connect to Kubernetes clusters , we will leverage the Google Kubernetes Engine Plugin

2.1 Installation of Plugin

Navigate to Jenkins Home Page and then to Manage Jenkins -> Manage Plugins -> Available

Search for Google Kubernetes Engine Plugin and install the plugin.

2.2 Configuration of Plugin

Once the Plugin is installed navigate to Manage Jenkins -> Manage Credentials -> Store (Name would depend upon Jenkins configuration)

Add the Credential with the name , note the name as this will be used in your pipeline , upload the key downloaded in step 1.5 . Refer to below screen shot


Let's keep in touch!

Stay updated with my latest posts and news. I share insights, updates, and exclusive content.

Unsubscribe anytime. By subscribing, you share your email with @santoshkothapalli and accept our Terms & Privacy.

Give a Pawfive to this post!


Only registered users can post comments. Please, login or signup.

Start writing about what excites you in tech — connect with developers, grow your voice, and get rewarded.

Join other developers and claim your FAUN.dev() account now!

Developer Influence
53

Influence

5k

Total Hits

1

Posts