Skip to main content
A full-stack bookstore webapp on a managed AKS cluster. This example provisions the cluster itself, it does not assume one already exists. One forma stands up the Azure infrastructure (resource group, virtual network, AKS subnet, the AKS managed cluster, and an Azure RBAC role assignment for the calling user), then deploys the workload onto it (a namespace, config and secret, a backend service account, an nginx frontend, and a Node.js backend with their services). It spans two targets: the Azure subscription that provisions the cluster, and the AKS cluster itself as a Kubernetes target that the app resources land on. The bookstore ships with the formae Kubernetes plugin examples, so resolve those as well with pkl project resolve /opt/pel/formae/examples/formae-plugin-kubernetes. Deploy. The cloud is selected by the entry file you apply. Export AZURE_SUBSCRIPTION_ID and AZURE_PRINCIPAL_ID (your Azure AD object id) first, then apply the Azure entry. formae orders the resources by their dependencies automatically, so the cluster comes up before the workload lands on it:
Verify. Once the command completes, the AKS cluster and the workload are under management:
Tear down. Remove the workload and the cluster it runs on:
The full forma is in the bookstore example.