There are two ways to add a new application: manually by using a form or automatically by using a manifest. This article explains how to add an application manually.
From the menu select Applications then click Add application with form.
Complete the required information, using the table below as a guide.
Select the namespace where the application will reside.
Give the application a descriptive name.
Select the registry to pull the image from. If you want to pull from a registry that is not configured with Portainer, click Advanced mode then enter the URL and image manually.
Enter the name (and optionally the tag) of the image that will be used to deploy the application.
Portainer can automatically bundle multiple applications inside a stack. You can either enter the name of a new stack, select an existing stack from the list, or leave empty to use the application name.
Define any environment variables for the application.
Select any configuration files you have previously created to make them available to the application.
Define any persistent folders within the application and whether these are new or existing volumes, as well as the size of the volume and storage location.
Data access policy
You have two options when specifying how data will be used across instances:
Isolated: Each instance of the application will use its own data.
Shared: All application instances will use the same data.
Define the amount of memory and CPU available to the application.
Choose how you want to deploy the application inside the cluster. Options are:
Replicated: Run one or multiple instances on this container.
Global: Deploy an instance of this container on each cluster node.
Define the number of instances of the application to run.
Enable auto scaling for this application
Toggle this to enable auto-scaling for the application you are deploying. This requires that the Kubernetes metrics server is installed and enabled in the cluster setup.
Enter the minimum number of instances that you want running for this application.
Enter the maximum number of instances that you want running for this application.
Target CPU usage
Enter the target CPU percentage for your application. The autoscaler will ensure that enough instances are running to maintain an average CPU usage of this value across all instances.
Define which placement rules must be followed by the nodes where the application is deployed to. Placement rules are based on node labels.
Select which policy to associate with the placement rules. Options are:
Mandatory: The application will only be scheduled on nodes that follow all rules.
Preferred: If possible, the application will be scheduled on nodes that follow all rules.
Publishing the application
Select how you want to publish the application. Options are:
Internal: Internal communications inside the cluster only.
Cluster: Publish via a port on all cluster nodes.
Define the published ports for the application. Only applicable if you selected the Cluster publishing method.