Hands on DevOps Coaching that is provided on AWS and Azure Cloud platforms. Contact me at devops.coaching@gmail.com for more info. You can directly reach out to Coach AK at +1(469) 733-5248
Azure Container Registry is a managed, private docker registry service. You can create and maintain Azure
container registries to store and manage your private Docker container
images.
It is alternative to Docker Hub. Azure Container Registry allows you to build, store, and manage
container images and artifacts in a private registry for all types of
container deployments.
Let us see how to upload a docker images from your VM into ACR.
We
will learn how to automate Docker builds using Jenkins and Deploy into
AWS EKS - Kubernetes Cluster.
We will use Springboot Microservices based Java application. I have already
created a repo with source code + Dockerfile. The repo also have
Jenkinsfile for automating the following:
- Automating builds using Jenkins - Automating Docker image creation - Automating Docker image upload into Docker Hub - Automating Deployments to Kubernetes Cluster
Please watch the above steps in YouTube channel:
Pre-requisites: 1. Amazon EKS Cluster is setup and running. Click here to learn how to create Amazon EKS cluster.
Step #1 -Make sure Jenkins can run Docker builds after validating per pre-requisites
Step #2 - Create Credentials for Docker Hub
Go to Jenkins UI, click on Credentials -->
Click on Global credentials
Click on Add Credentials
Now Create an entry for your Docker Hub account. Make sure you enter the ID as dockerhub
Step #3 - Create Credentials for Kubernetes Cluster
Click on Add Credentials, use Kubernetes configuration from drop down.
execute the below command to get kubeconfig info, copy the entire content of the file:
sudo cat ~/.kube/config
Enter ID as K8S and choose enter directly and paste the above file content and save.
Step #4 - set a clusterrole as cluster-admin
By default, clusterrolebinding has system:anonymous set which blocks the cluster access. Execute the following command to set a clusterrole as cluster-admin which will give you the required access.
Step # 6 - Copy the pipeline code from below Make sure you change red highlighted values below: Your docker user id should be updated. your registry credentials ID from Jenkins from step # 1 should be copied