Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deploy and scale up Serverless Kubernetes applications

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail how to achieve Serverless Kubernetes application deployment and expansion. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

Cluster creation and application deployment 1. Cluster creation

After fully understanding the basic concepts of Serverless Kubernetes, we go directly to the Container Service console (https://cs.console.aliyun.com/#/authorize) to create the cluster.

On the creation page, there are three main types of attributes to select or fill in:

The region created by the cluster and the version information of Kubernetes

Network attributes: you can choose CCS to create automatically or specify existing VPC resources.

Cluster capabilities and services: you can choose on demand.

After the attribute is completed, click "create Cluster". The whole creation process will take 1-2 minutes.

two。 Application deployment

After the cluster is created, we deploy a stateless nginx application, which is divided into three steps:

Basic information of application: name, quantity of POD, label, etc.

Container configuration: image, required resources, container port, data volume, etc.

Advanced configuration: services, routing, HPA, POD tags, etc.

After the creation is completed, you can see how the service is exposed in the route.

As shown in the figure above, the local host binds the ask-demo.com to the resolution of the routing endpoint 123.57.252.131, and then the browser accesses the domain name to request the deployed nginx application.

Introduction to common functions

We generally use the common features of Serverless Kubernetes through the CCS console and Kubectl.

1. Container service console

On the CCS console, we can perform the white screen operation of the following features:

Basic information: cluster ID and running status, API Server endpoints, VPC and security, view and operation of cluster access credentials

Storage volumes: viewing and operation of PV, PVC, and StorageClass

Namespace: view and operation of cluster namespace

Workload: view and operation of Deployment, StatefulSet, Job, CronJob, Pod

Service: view and operate the Service provided by the workload

Routing: view and operation of Ingress, which is used to route Service

Publishing: view and manipulate tasks published in batches based on Helm or CCS

Configuration management: viewing and manipulating ConfigMap and Secret

Operation and maintenance management: cluster event list and operation audit.

2. Kubectl

In addition to the console, we can also operate and manage clusters based on Kubectl.

We can use Kubectl through CloudShell in the cloud, or we can install Kubectl locally, and then use Serverless Kubernetes by writing the cluster's access credentials to kubeconfig.

Apply elastic stretching

Through the above explanation, we have learned about the deployment of the application and the common operations of the cluster. Let's introduce how to scale up the application.

The commonly used scaling methods in Serverless Kubernetes include:

Manual expansion and reduction: the most primitive way, there is a certain degree of sacrifice in cost and application stability.

HPA (Horizontal Pod Autoscaler): adaptively scales according to metrics such as Cpu and Memory, and is suitable for applications with burst traffic scenarios

Cron HPA: periodically stretch according to Cron expression, suitable for applications with fixed peaks and troughs.

External Metrics (alibaba-cloud-metrics-adapter): Ali Cloud metric container scales horizontally, supporting more data metrics on the basis of native HPA.

On how to achieve Serverless Kubernetes application deployment and capacity expansion to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report