Hands on DevSecOps Coaching that is provided on AWS and Azure Cloud platforms. Contact Coach AK at devops.coaching@gmail.com for more info. You can also reach out to Coach AK at +1(469) 733-5248
Thursday, November 17, 2022
How to Deploy Springboot App into AKS cluster using Jenkins Pipeline and Kubectl CLI Plug-in | Deploy Microservices into AKS cluster using Jenkins Pipeline
We are going to learn how to Automate build and deployment of Springboot Microservices App 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
Watch Steps in YouTube Channel:
Pre-requisites:
1. AKS cluster needs to be up running. You can create AKS cluster using any of one of the below options:
sh ('kubectl apply -f jenkins-aks-deploy-from-acr.yaml')
}
}
}
}
}
}
Step # 5 - Build the pipeline
Step # 6 - Verify deployments to AKS
kubectl get pods
kubectl get services
Steps # 7 - Access Springboot App Deployed in AKS cluster
Once deployment is successful, go to browser and enter above load balancer URL mentioned above
You should see page like below:
Clean up the Cluster:
To avoid charges from Azure, you should clean up unneeded resources. When the cluster is no longer needed, use the az group delete command to remove the resource group, container service, and all related resources.
az group delete --name myResourceGroup --yes --no-wait
No comments:
Post a Comment