Skip to main content

Collaborate, Automate

KusionStack codifies and unifies platform resources into stacked models and policies.

All about your modern app by Platform as Code

KusionStack codifies and unifies platform resources into stacked models and policies.

[object Object]

Easy App Shipping

Fast development, easy delivery

  • Codify and unify spec, resources and manifests around modern apps
  • Orchestration and provision on Kubernetes and Clouds in a managed manner
  • Easy-to-access, Kubernetes-first, lightweight and dev-friendly
[object Object]

Enterprise Declarative DevOps

From the first code to production

  • Multi teams, projects go across multi phases to multi runtimes, clouds
  • Production-ready with scalability, performance and left-shifted stability
  • Various usages to meet the requirements of diverse enterprise scenarios
[object Object]

Enable Platform Engineering

Build proper abstraction and golden path

  • Schema-centric abstraction and constraints to build your models and validations
  • Easy to integrate into CI pipeline, service and product to build your paved road
  • Fast development on raw platform capabilities with consistency to cope with change

Codify Your Modern Delivery

With configs, models, functions and rules

import base.pkg.kusion_models.kube.frontend
appConfiguration: frontend.Server {
image = "howieyuen/gocity:latest"
}
-- Config
import base.pkg.kusion_models.kube.frontend
appConfiguration: frontend.Server {
image = "howieyuen/gocity:latest"
}
schema Server:
"""Server is the abstraction of Deployment and StatefulSet.
image: str, default is Undefined, required.
Image name. More info: https://kubernetes.io/docs/concepts/containers/images.
replicas: int, default is 1, required.
Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.
labels: {str:str}, default is Undefined, optional.
Labels is a map of string keys and values that can be used to organize and categorize (scope and select) objects.
"""
image: str
replicas: int = option("replicas") or 1
labels?: {str:str}
-- Schema
schema Server:
"""Server is the abstraction of Deployment and StatefulSet.
image: str, default is Undefined, required.
Image name. More info: https://kubernetes.io/docs/concepts/containers/images.
replicas: int, default is 1, required.
Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.
labels: {str:str}, default is Undefined, optional.
Labels is a map of string keys and values that can be used to organize and categorize (scope and select) objects.
"""
image: str
replicas: int = option("replicas") or 1
labels?: {str:str}
import base.pkg.kusion_models.kube.frontend
genLocalityLabels = lambda az: str, cell: str, cluster: str, app: str -> {str:str} {
{
"aws/az" = az
"aws/cell" = cell
"cluster.x-k8s.io/cluster-name" = cluster
"app.kubernetes.io/name" = app
}
}
appConfiguration: frontend.Server {
labels: genLocalityLabels("us-west-1a", "us-west-2-lax-1a", "my-cluster", "gocity")
}
-- Lambda
import base.pkg.kusion_models.kube.frontend
genLocalityLabels = lambda az: str, cell: str, cluster: str, app: str -> {str:str} {
{
"aws/az" = az
"aws/cell" = cell
"cluster.x-k8s.io/cluster-name" = cluster
"app.kubernetes.io/name" = app
}
}
appConfiguration: frontend.Server {
labels: genLocalityLabels("us-west-1a", "us-west-2-lax-1a", "my-cluster", "gocity")
}
import regex
rule ServerRule for Server:
1 <= replicas < 20, "replica should be in range [1, 20)"
regex.match(image, r"^([a-z0-9.:]+).([a-z]+):([a-z0-9]+)/([a-z0-9.]+)/([a-z0-9-_.:]+)$"), "image name should satisfy the `REPOSITORY:TAG` form"
ServerRule()
-- Rule
import regex
rule ServerRule for Server:
1 <= replicas < 20, "replica should be in range [1, 20)"
regex.match(image, r"^([a-z0-9.:]+).([a-z]+):([a-z0-9]+)/([a-z0-9.]+)/([a-z0-9-_.:]+)$"), "image name should satisfy the `REPOSITORY:TAG` form"
ServerRule()

Config

Start your cloud-native journey with scalable config

Schema

Abstract your schema-centric model with static typing

Lambda

Define and reuse your config and logic through small function fragments

Rule

Define your environmental rules to ensure consistency and stability

Adopted by

Ant Group
YouZan
Kyligence

KusionStack is in Cloud Native Computing Foundation landscape