# Deploy to Kubernetes

Use `aspire publish` or `aspire deploy` to take your Aspire application to Kubernetes. Aspire uses the Kubernetes-targeted environments in your AppHost to determine how each compute resource maps to Kubernetes objects, then generates Helm charts or provisions infrastructure depending on the target you choose.

<LearnMore>
To understand how Aspire deployment works across all targets, see the [Deployment overview](/deployment/deploy-with-aspire/).
</LearnMore>

## Choose your target

Aspire supports two Kubernetes deployment targets:

[Kubernetes](/deployment/kubernetes/kubernetes/)
  [Azure Kubernetes Service (AKS)](/deployment/kubernetes/aks/)
## Shared prerequisites

- [Aspire prerequisites](/get-started/prerequisites/)
- [Aspire CLI](/get-started/install-cli/) installed
- [kubectl](https://kubernetes.io/docs/tasks/tools/) installed and available on your `PATH`
- [Helm](https://helm.sh/docs/intro/install/) installed and available on your `PATH`

## How Aspire maps resources to Kubernetes

When you publish or deploy, Aspire translates your application model into Kubernetes-native resources:

| Aspire resource       | Kubernetes resource                          |
| --------------------- | -------------------------------------------- |
| Project resources     | Deployments or StatefulSets                  |
| Container resources   | Deployments or StatefulSets                  |
| Connection strings    | ConfigMaps and Secrets                       |
| Environment variables | ConfigMaps and Secrets                       |
| Endpoints             | Services                                     |
| Volumes               | PersistentVolumes and PersistentVolumeClaims |

## Publish vs deploy

Both Kubernetes targets support `aspire publish`. The key difference is whether the target also supports `aspire deploy`:

| Target     | `aspire publish`                                   | `aspire deploy`                                                    |
| ---------- | -------------------------------------------------- | ------------------------------------------------------------------ |
| Kubernetes | Generates Helm charts you apply with `helm` or CI  | Deploys to the current `kubectl` context using `helm install`      |
| AKS        | Generates Helm charts and Bicep infrastructure     | Provisions Azure resources and deploys in a single command         |

<LearnMore>
For more on the pipeline model and how publish and deploy relate, see [Pipelines and app topology](/deployment/pipelines/).
</LearnMore>

## Continue learning

[Deploy to Kubernetes](/deployment/kubernetes/kubernetes/)
  [Deploy to AKS](/deployment/kubernetes/aks/)
  [Kubernetes integration](/integrations/compute/kubernetes/)
  [AKS integration](/integrations/cloud/azure/aks/)