Add a new application using a form

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 with form.

Complete the required information, using the sections below as a guide.

Base configuration

Environment variables

Here you can define any environment variables you wish to be available to your application.

ConfigMaps

Select any ConfigMaps you have previously created to make them available to the application. Portainer will automatically expose all the keys of a ConfigMap as environment variables. This behavior can be overridden to filesystem mounts for each key via the Override button.

Secrets

Select any secrets you have previously created to make them available to the application. Portainer will automatically expose all the keys of a secret as environment variables. This behavior can be overridden to filesystem mounts for each key via the Override button.

Persisted folders

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.

You can also define the Data access policy for your persisted folders:

  • Isolated: Each instance of the application will use its own data.

  • Shared: All application instances will use the same data.

Resource reservations

In this section you can define the amount of memory and CPU available to the application. If the namespace you have selected has resource quotas set, you must define these values.

Deployment

This section allows you to choose how you want to deploy the application inside the cluster. Options are:

  • Replicated: Run one or multiple instances of this container.

  • Global: Deploy an instance of this container on each cluster node.

You can also define the number of instances of the application to run by setting the Instance count.

Auto-scaling

Toggle Enable auto scaling for this application 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.

Placement preferences and constraints

Here you can define which placement rules must be followed by the nodes where the application is deployed to. Placement rules are based on node labels. To create a new rule, click add rule.

You can also define the placement policy for the rules you have set. 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

Here you can create the necessary services to expose your application. Select the type of service (ClusterIP, NodePort, or LoadBalancer) from the tabs and click Create service. You can then configure each service as required, including adding annotations to the services if required.

You can expand the Explanation link for more detail on how each service type works.

When you have finished, click Deploy application.

Last updated