Use a Stack
A Stack deploys a group of applications to one cluster or control plane cluster. The StackTemplate controls dependencies, health gates, parameters, and values shared between tasks.
Use an App for one independently managed application. Use a Stack when several applications need ordering, health gates, or values from earlier tasks.
Understand licensing​
Stacks don't have a separate license feature. App tasks use the Apps feature, and Argo CD Application tasks use the Argo CD Integration feature. Both are available on every plan, including the free plan.
If a task isn't licensed, the StackInstance is blocked with the FeatureNotAllowed reason.
Choose how to install a Stack​
You can install a Stack three ways:
- From the destination's Stacks tab, to add a Stack to a cluster or control plane cluster that already exists.
- During cluster creation, when the Stack should exist from the start.
- Through
vcluster.yaml, when you manage the cluster's configuration declaratively, such as through GitOps.
- From the Stacks tab
- During cluster creation
- vcluster.yaml
Install a Stack from the destination it deploys to. The Stacks tab appears on a cluster when you can list StackInstances in its project. On a control plane cluster, the tab appears only when the Argo CD Integration feature is enabled.
Before you install, check these requirements:
- Permissions. The default Project Admin role can install Stacks. The default Project User role can't, so project users don't see the Stacks tab unless a custom project role grants StackInstance permissions. See Stack permissions.
- Allowed templates. The project's allowed templates must include the StackTemplate, or
*for every StackTemplate. The template list doesn't filter by this setting, so a template the project doesn't allow is rejected only when you install it. - Destination access. Both you and the StackInstance owner need access to the destination. A control plane cluster must also be in the project's allowed clusters.
- Published outputs. Reading published output values requires
geton thestackinstances/outputssubresource.
Open the destination cluster or control plane cluster, and select its Stacks tab.
Click .
For a control plane cluster, select the project that owns the StackInstance.
In Stack Template, select a StackTemplate. Review its description, parameters, and dependency graph.
Enter the required parameters. Optionally, set the prune policy and task timeout in the Advanced Configuration section.
Click , then monitor the aggregate status and each task on the Stack card.
Cluster creation has a Stacks configuration section for clusters that run vCluster v0.37 or later. It isn't available when you create a cluster from a template, or for Standalone and external clusters. The section lists only the StackTemplates that the project allows.
Go to Clusters, and click .
Select a template or configure the cluster.
Open the Stacks section, and select a StackTemplate.
Set its name and parameters. Add other Stacks when required.
Finish the cluster configuration, and click .
The platform adds each Stack to the cluster's vcluster.yaml under deploy.stacks, so its lifecycle follows the cluster's. See the vcluster.yaml tab for how those entries behave.
Use deploy.stacks to include a Stack in a cluster configuration:
deploy:
stacks:
- name: observability
# Resolve this cluster-scoped StackTemplate during reconciliation.
templateRef:
name: observability
parameters:
retention: 7d
# Keep applications if a future template removes their tasks.
prunePolicy: Retain
Each entry needs a stable name and exactly one of templateRef or an inline template. A referenced StackTemplate is resolved live during reconciliation.
You can also set defaults.taskTimeout and prunePolicy. The default task timeout is 10 minutes. The default prune policy is Retain.
The destination is always the cluster whose configuration contains the entry. Removing an entry deletes its managed StackInstance, and deleting the cluster deletes all StackInstances it manages. The generated StackInstance name combines the cluster and Stack names and adds a hash suffix when needed to stay within the Kubernetes name limit. The platform.vcluster.com/stack-config-name label records the original Stack name.
Managed StackInstances follow these rules:
- Owner. Each StackInstance inherits the cluster's owner.
- Allowed templates. A
templateRefmust be in the project's allowed templates, the same as when you install a Stack in the UI. - Configuration wins. Each sync rewrites the StackInstance from
vcluster.yaml, so edit the configuration instead of the StackInstance. A StackInstance with the same name that the cluster doesn't own blocks the sync. - Limits. A cluster can declare up to 50 Stacks, and each
namemust be a unique DNS label. Unknown keys are rejected. - Argo CD tasks. A Stack with Argo CD Application tasks needs the cluster's Argo CD integration configured.
- Failed entries. An entry that's invalid or blocked keeps its existing StackInstance unchanged until you fix it.
The cluster reports the result on its StacksSynced condition. See Stacks deployed from vcluster.yaml to resolve its reasons.
Monitor a stack​
The StackInstance aggregate phase summarizes all tasks:
| Phase | Meaning |
|---|---|
Pending | A prerequisite needs manual action. |
Progressing | At least one task is rolling out. |
Healthy | Every task is healthy. |
Degraded | At least one task failed. |
Deleting | The Stack and its owned children are being removed. |
Tasks can be Pending, Waiting, Progressing, Blocked, Healthy, or Failed. A waiting task hasn't started because one or more dependencies aren't healthy.
Inspect status through the management API:
vcluster platform connect management
kubectl get stackinstance <stack-name> -n <project-namespace> \
-o jsonpath='{.status.phase}{"\n"}{range .status.tasks[*]}{.name}{"\t"}{.phase}{"\t"}{.message}{"\n"}{end}'
Update or remove a Stack​
On the Stack card, edit the StackInstance to change its parameters, or use Retry Sync to retry failed tasks. You can also edit the StackInstance through the management API. The controller renders the template again and reconciles its tasks.
The controller also reapplies the fields it manages on each child App and Argo CD Application, so manual edits to those fields revert. Change the StackTemplate or StackInstance instead.
When a referenced StackTemplate removes a task, prunePolicy controls the existing child:
Retain, the default, keeps the child and reports it instatus.orphanedApplications. The cluster's Apps tab marks the app as an orphaned application, and you can delete it there. You can't delete an app that a Stack still manages from that tab.Prunedeletes removed children in reverse dependency order.
Deleting a StackInstance removes every application it still owns, including retained orphans. Application charts can leave persistent volumes, namespaces, hooks, or custom resource definitions behind. Review the application's uninstall behavior before deletion.
Next steps​
- Create a Stack template to author task graphs and outputs.
- Manage Certified Stacks to deploy the bundled integrations, such as NVIDIA Run:ai.
- Stack permissions to configure RBAC for Stack resources.
- StackInstance reference for the full field schema.
- Troubleshoot Stacks to diagnose blocked or failed tasks.