> For the complete documentation index, see [llms.txt](https://docs.portainer.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.portainer.io/portainer-documentation/3.0-sts/user/kubernetes/applications/manifest/create.md).

# Create an application from a Manifest

When creating an application from a Manifest, first select your deployment method in the **Deploy from** section.

<figure><img src="https://content.gitbook.com/content/NaHIkLFUk78GrFLS4raF/blobs/Mvsop2vf8zay1I2dM4mh/2.35-K8-from-manifest.png" alt=""><figcaption></figcaption></figure>

Then, select the **Namespace** to deploy to and optionally provide a **Name** for your deployment in the **Deploy to** section. If you wish to group your stacks, specify a **Stack** name to label the resource.

{% hint style="info" %}
If you want to use namespaces defined in your manifest, you can leave **Namespace** set to `default` and toggle on the **Use namespace(s) specified from manifest** option.
{% endhint %}

Your next options will depend on the deployment method you selected.

## Repository

Use the provided fields to enter the details of your Git repository containing your Kubernetes manifests.

| Field/Option         | Overview                                                                                                                                                                                                                                                                                                                                                                                        |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Source               | Select your Git repository from your list of preconfigured [sources](/portainer-documentation/3.0-sts/user/app-delivery/sources.md). Select **Create new source** to navigate to the [source creation view](/portainer-documentation/3.0-sts/user/app-delivery/sources/add-a-new-git-repository-source.md).                                                                                     |
| Repository reference | Select the reference to use when deploying the stack (for example, the branch).                                                                                                                                                                                                                                                                                                                 |
| Manifest path        | Enter the path to your manifest file relative to the root of your repository.                                                                                                                                                                                                                                                                                                                   |
| Additional paths     | Click **Add file** to define additional manifests or compose files to process as part of the deployment.                                                                                                                                                                                                                                                                                        |
| Create a Webhook     | <p>When enabled, the webhook URL to use is displayed. Click <strong>Copy link</strong> to copy the webhook to your clipboard.<br>For more on webhooks, refer to the <a href="/portainer-documentation/3.0-sts/user/kubernetes/applications/webhooks.md">webhook documentation</a>.</p>                                                                                                          |
| Force redeployment   | <p>When enabled, when redeploy is triggered via the webhook, <code>kubectl apply</code> is always performed, even if Portainer detects no difference between the git repo and what was stored locally on the last git pull.</p><p>This is useful if you want your git repo to be the source of truth and are fine with changes made directly to resources in the cluster being overwritten.</p> |

<figure><img src="https://1210853305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNaHIkLFUk78GrFLS4raF%2Fuploads%2FdukXY6mW8lGYRLD4VHWw%2F3.0-application-git-repo.png?alt=media&amp;token=410a23db-1775-4e3e-a24b-420914a56a63" alt=""><figcaption></figcaption></figure>

## Web editor

Use the Web editor to write or paste in your Kubernetes manifest.

<figure><img src="https://content.gitbook.com/content/NaHIkLFUk78GrFLS4raF/blobs/fHmleNs0ba49JfJwaE2C/2.20-kubernetes-applications-manifest-webeditor.png" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can search within the web editor at any time by pressing `Ctrl-F` (or `Cmd-F` on Mac).
{% endhint %}

## URL

Enter the **URL** to your manifest file in the provided field.

<figure><img src="https://content.gitbook.com/content/NaHIkLFUk78GrFLS4raF/blobs/ixzHKTjLuCTclshUfAkL/2.20-kubernetes-applications-manifest-url.png" alt=""><figcaption></figcaption></figure>

## Custom template

From the **Template** dropdown, select the custom template to use. Depending on the template, you may need (or be able) to set template variables that will adjust the deployment configuration. As an optional step, you can edit the template before deploying the application. If you have no custom templates you will be given a link to the [Custom Templates](/portainer-documentation/3.0-sts/user/kubernetes/templates.md) section.

<figure><img src="https://content.gitbook.com/content/NaHIkLFUk78GrFLS4raF/blobs/9VnOjr8r16XHWJrvC4hS/2.20-kubernetes-applications-manifest-customtemplate.png" alt=""><figcaption></figcaption></figure>

## Additional fields

### Deployment options

| Field/Option    | Overview                                                                                                                                                                                                                                   |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Prune resources | When enabled, updating this artifact will also delete the resources it previously created that the manifest no longer declares. Turning this off leaves those resources running on the cluster with nothing in Portainer pointing at them. |
| Force recreate  | For fields that cannot be changed after a resource is created, enable force recreate to let Portainer delete and recreate resources instead of failing the deployment.                                                                     |

<figure><img src="https://1210853305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNaHIkLFUk78GrFLS4raF%2Fuploads%2FKUJ5F4yFC62V7CsTJfs9%2F3.0-deployment-options.png?alt=media&amp;token=bf8dc4c9-84d8-467b-bc3d-b66830985a0d" alt=""><figcaption></figcaption></figure>

When you're ready, click **Deploy**.
