×
Community Blog Creating Containerized Application using ACK

Creating Containerized Application using ACK

Alibaba Cloud Container Service for Kubernetes (ACK) can be used for creating Microservice applications that support high availability and scalability with low cost.

Introduction:

Alibaba Cloud Container Service for Kubernetes (ACK) can be used for creating Microservice applications that support high availability and scalability with low cost. It also provides the features such as deployment, scheduling, orchestration and automated CI/CD for building the containerized applications quickly.

Different Types of ACK Clusters are

(i)Dedicated Kubernetes: You need to manually create master and worker nodes. You are only charged for master nodes, worker nodes, and other infrastructure resources

(ii)Managed Kubernetes: You only need to create and manage worker nodes while master nodes will be managed by ACK.

(iii)Serverless Kubernetes: You can directly launch applications without creating or managing any node.

In this blog, we are going to learn how to deploy an application in the ACK cluster of Alibaba Cloud.

Various steps in deploying Application in ACK Cluster using Alibaba Cloud Container Services are

1.Setting up repository

2.Creating ACK Cluster

3.Creating Container Registry

4.Create deployment and service

1.Setting up repository

Login to your Github repository by providing your username and password. Create a docker file with all the maven build and all the needed commands to run the application in the port 8080.create all the necessary files for the application in the repository.

CquiFps99FrusMRIpkHkAlnV45B02Im4sXw488We

2.Creating ACK Cluster

In Alibaba Cloud Console,Choose “Container Service for Kubernetes” and then select Standard Dedicate cluster and follow the following steps

2.1:Cluster Configuration

2.2:Master Node Configuration

2.3:Worker Node Configuration

2.4:Component Configuration

2.1:Cluster Configuration:

After choosing the needed cluster for deploying your application(here I have chosen Standard Dedicate cluster),You have to provided basic details such as Cluster Name,Region,Version and Container runtime.

iaVQmUfglPel254mVgU58rIEiokdsRabuI8rLYkr

After providing basic information you have to provide details such as VPC,Vswitch,Network Plugin,Pod CIDR Block,Service CIDR Block and finally select public access if you want to access the service through the internet.

fUj-B6RUA9oTXixnd0KuqwmbL0AYl2OOWZcV1QZ2

2.2:Master Node Configuration

In master node configuration you have to select one of  the Available billing methods such as pay-as-you-go, subscription model and you have to  select the no of master nodes required for the cluster.

irbdDclqNRnOCHLc5_C4FphVO2qqRT_NNzjuQHL0

Finally you have to select the required instance type for your application from the available instances.

-Wzkp1N_glcHU6eTH4dl_Xp4o6gSF9STR3V5oLEJ 

2.3:Worker Node Configuration

In the worker node configuration you have to select the required instance by clicking select instance,quantity of worker node required and its disk size,operating system and login type.

cxa_sdk8AT0oc3UtXXRqNu9Wt8fKGb2XdWjA8_oh

2.4:Component Configuration

In component configuration you can choose additional features such as Ingress Controller,Cloud monitor,Log service and creating ingress Dashboard.Finally after selecting the required component you can confirm the order and inturn you can create the cluster by using create cluster.


N0SJRtkJOlZqXO7IC-G9vE0655EEybqeoFuTD5id

MZUghkbCIZXLjzWHCEcFTqsOGuMzo6sAgA6smcmW

3.Creating Container Registry

In the Alibaba cloud console, select the container registry and follow the step for creating the registry.

3.1.Creating repository and code source

3.2.Adding Build Rule

3.3.Building the registry

3.1.Creating repository and code source

For creating container repository you have to provide repository info and  code source

In repository info you have to provide  Region, namespace, Repository name, Repository type, summary and description.

gWFmGcP3xech9hWJan-IxW9DRW_6oDzrdTQEsWVt

After providing repository info, bind with the GitHub repository by providing GitHub username and password.

_PZrESWev3zX1pOYjhrznQbUBnx1905ZEFaEKqF7

3.2.Adding Build Rule

 Create the build rule by providing type, code branch, docker file and tags.

gpyjYrTjzkxtyXPHsFsmm7xAhsFk-eMTb2qawsdp

3.3.Building the registry

-Finally, build the registry by clicking the build button and after a few minutes once the build is completed it displays successful in the build status.



 lpgixjxuLcvMtw6YELg5hvYks4n55xwyFO3dprD1

4.Create deployment and service

Go to Container service for kubernetes dashboard and select the Cluster created and continue the following steps

4.1:Create a deployment by providing details such as name, cluster, namespace, replicas and type.

4.2:In the container provider select image name and image version.

4.3:Create a service by providing details such as name, namespace and service load balancer.

4.4:In the local port, mapping provides the name of service, service port as 80, container port as 8080 and click ok.

4.5:Finally, the service will be created and you can view the service by clicking the public IP address present in the service.

1iixB-Rx3YMaoCBzdZmX3R2zY6_Q5TwdMu7aC-uW

92HBVpfVKTpr8OoOHXl7p39vykfpJZwLZRqolg8Q


Wrapping it Up:

Container Service for Kubernetes makes easy  the creation,deployment and service creation in  clusters.It can manage the entire life cycle of the container from creation to deletion.In this blog we leant how to create and deploy containerized application using Alibaba Container Service,Container registry and GitHub.


0 0 0
Share on

GAVASKAR S

12 posts | 3 followers

You may also like

Comments

GAVASKAR S

12 posts | 3 followers

Related Products