DEV Community

Cover image for Creating a kubernetes cluster and deploying nodejs + mssql container from ACR.
emmilly immaculate
emmilly immaculate

Posted on • Updated on

Creating a kubernetes cluster and deploying nodejs + mssql container from ACR.

So i have been told that kubernetes is called K8s(kaites).

That it saves developers and operators a great deal of time and effort, and lets them focus on building features for their applications, instead of figuring out and implementing ways to keep their applications running well, at scale.

So i decided to explore it today in azure.At this point a have a full stack node and mssql app in my container registry in azure.

I went ahead and created a K8s cluster on azure.
tree

k8s

create

create
Using powershell,i set the credentials and subscription.

az account set --subscription xxx-xxxxx-xxxx-xxx--xxxx
Enter fullscreen mode Exit fullscreen mode

Download cluster credentials.

az aks get-credentials --resource-group sqltest --name aksname
Enter fullscreen mode Exit fullscreen mode

Ijdjdk

To see the nodes available

jjdkdkd

Next is to create a yaml file for the k8s deployment.
Using vim editor, i create a node_mssql.yaml file

yml file

yaml file

file

Now create deployment

kubectl apply -f nameofyamlfile
Enter fullscreen mode Exit fullscreen mode

file

Then paste the externalIP into the browser and the port exposed.

http://20.87.92.55:3000
Enter fullscreen mode Exit fullscreen mode

kub

I cant believe i just did that!!

Top comments (0)