Deploy Springboot App into AKS Cluster using Jenkins Pipeline | Deploy Springboot to Kubernetes

preview_player
Показать описание

How to Automate build and deployment of Springboot Microservices Docker Container into Azure Kubernetes Cluster(AKS) using Jenkins pipeline?

Sample springboot App Code:
I have created a sample Springboot App setup in GitHub. Click here to access code base in GitHub.

Jenkins pipeline will:

- Automate maven build(jar) using Jenkins
- Automate Docker image creation
- Automate Docker image upload into Azure container registry
- Automate Deployments to Azure Kubernetes Cluster

Pre-requisites:
1. AKS cluster needs to be up running. You can create AKS cluster using any of one of the below options:
Create AKS cluster in Azure portal directly
Create AKS cluster using Azure CLI
Create AKS cluster using Terraform
2. Jenkins instance is setup and running
3. Make sure to Install Docker, Docker pipeline and Kubectl CLI plug-ins are installed in Jenkins
4. Install Docker in Jenkins and Jenkins have proper permission to perform Docker builds
5. Install Kubectl on Jenkins instance
6. ACR is also setup in Azure cloud.
7. Make sure AKS has pull access from ACR
8. Dockerfile created along with the application source code for springboot App.
9. Modify K8S manifest file per acr, image name for AKS Deployment.
10. Install Azure CLI on your local machine. (We will be creating the AKS cluster from our local machine)

Рекомендации по теме
Комментарии
Автор

it took 2 years to find perfect example Thank you sir.

tvjmohan
Автор

well explained bro. Thanks for your sharing

karthimvs
Автор

Excellent video Sir, if u use Dependancy check, Trivy scan also, its become full complex best CICD....

naren
Автор

Brilliant I was following another vid and they were using "kubernetes continuous deploy" which is no longer used. But kubeconfig:Setup Kubernetes CLI (kubectl) seems a lot better. And more
intuitive.

tonycavanagh
Автор

Hi, can you please make a video & explain the writing/structure of Ansible & Terraform in a simple manner & in layman's terms, like when & where to add spaces, hyphens, what is variable, etc it's a bit confusing...I am not from a programming background and hence find it difficult to understand. please it's a request, do reply

vinvvinv
Автор

I am looking to do a similar setup in this video but the task is to make everything in an IaC approach. I am looking to use Terraform to do this but i am a bit confused on how to set everything up. Do you have any resource that can be of help to me. Thanks

victoranolu
Автор

How does the Kubernetes authenticates to the ACR? It needs to have a 'imagePullSecrets' command in the yaml file.

PrithviRajKC
Автор

Hi, Deployment can't happen with Jenkins, need Authentication


kubectl apply -f springboot-lb.yaml
Error from server (Forbidden): <html><head><meta http-equiv='refresh' color:white;'>


Authentication required
This is the Error

debabratamohanty
Автор

I am getting error while pushing image in to acr, login failed error

sheshammoukthika
Автор

is it possible to deploy multiple docker images on AKS simultaneously?

sarthak