Building Serverless Kubernetes Clusters for Serverless Jobs

Going Serverless

  1. Your jobs only run at a specific time.
  2. Your jobs face a peak hour at a special occasion or time.
  3. Your jobs are trigger-based and only handle events as they come.
  4. Your solution and its internal services are asynchronous in nature.

Serverless Jobs

Serverless Infrastructure

Create a Serverless Kubernetes Cluster

Connecting to the cluster

$ kubectl version
apiVersion: apps/v1
kind: Deployment
metadata:
name: express-nodejs-deployment
labels:
runtime: nodejs
spec:
replicas: 3
selector:
matchLabels:
name: express-nodejs-pod
template:
metadata:
labels:
name: express-nodejs-pod
spec:
containers:
- name: express-nodejs
image: afzaalahmadzeeshan/express-nodejs:latest
ports:
- containerPort: 5000
resources:
limits:
memory: 256Mi
cpu: 250m
---
apiVersion: v1
kind: Service
metadata:
name: express-nodejs-service
spec:
ports:
- port: 80
targetPort: 5000
selector:
name: express-nodejs-pod

Connecting using Alibaba Cloud Shell

Serverless on Kubernetes

Original Source:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com