Earlier than we will go into the deployment of an utility onto a Kubernetes cluster, let me give some fast introduction in order that we’re conscious of what occurs whereas deploying an utility onto a cluster.
In my final article How To Create An Azure Kubernetes Cluster I had spun up a cluster on the Azure platform, on this cluster, we specified that we would like one node as a part of the cluster. So, this node will probably be used to run our containerized functions.
After we run an utility in a container of a node in a cluster, it runs in a pod.
POD is the smallest and primary deployment on a cluster. So, when a container must run on a node, it’s going to really run in a pod. That pod can be given its personal IP handle, its personal inner IP handle.
Usually one pod is made for one container, however you’ll be able to run a number of containers, as part of a pod. you can even have a number of pods operating, as a specific deployment.
There’s ideas of replicas in Kubernetes, To be able to load steadiness the visitors or to realize excessive availability of the containers with a number of pods operating in order that visitors will get distributed to the pods. so, we will specify the variety of replicas to run. Every duplicate consists of quite a few pods.
Aside from that, the opposite benefit of operating containers in a Kubernetes cluster is rolling deployments of orchestration Software program.
if you wish to change the underlying container picture, as an example your utility operating is on its pod within the nodes of a cluster and also you made a change to the applying. You wish to deploy that utility’s new picture and that picture must go onto the respective container.
This may be achieved by rolling deployments within the cluster. it’s going to go and change the containers within the pod throughout the deployment.
Aside from that, it additionally has some self-healing companies in case if a pod does fail then robotically the Kubernetes software program will attempt to begin the pod once more in order that your utility is at all times operating.
I simply wish to point out a fast word on what’s a service precept as a result of in our use case, we’re going to make an azure Kubernetes service that really pulls out a picture from the azure container registry (ACR).
Since Azure Container Registry is a separate service and Azure Kubernetes Service is once more a separate service in azure. So usually, whenever you wish to make one service speak to a different service in azure, one service must be licensed to principally use the opposite service.
To realize this, we will have a person outlined in Azure after which attempting to utilize that person’s credentials, which might in all probability have entry to the Azure container registry. However as a substitute of utilizing this type of technique for authorizing the cluster to get a picture from the registry.,we will create a service precept. So, that is like one other identification that is obtainable in Azure.
The service principal will get an ID that is often known as a shopper ID then assigns a task to the service precept and the service precept could possibly be assigned to your service (azure Kubernetes cluster). This position would then give the required authorization rights to this cluster to go and pull the picture from the Azure Container Registry.
Now we have mentioned the fundamental idea of utility deployment within the Azure Kubernetes cluster and Azure container registry. Now we have additionally discovered the fundamentals of the service principal and the way it’s used to speak between two Azure companies.