Skip to content

Create application

This how-to guide will show you how to create a NAIS manifest for your application.

Setup

Inside your application repository, create a .nais-folder.

cd <MY-APP>
mkdir .nais

Create a file called app.yaml in the .nais-folder.

touch .nais/app.yaml

Define your application

Below is a basic example of an application manifest.

Add the following content to the file, and insert the appropriate values in the placeholders on the highlighted lines:

.nais/app.yaml
apiVersion: nais.io/v1alpha1
kind: Application
metadata:
  name: <MY-APP>
  namespace: <MY-TEAM>
spec:
  image: {{image}} # Placeholder variable to be replaced by the CI/CD pipeline
  port: 8080
  replicas:
    max: 4
    min: 2
  resources:
    requests:
      cpu: 200m
      memory: 128Mi

This application manifest represents a very basic daemon application. You will likely want to add more configuration to your application manifest based on your needs.

🎯 Build and deploy your application to NAIS.

🎯 Expose your application.

📚 Application spec reference.

📚 Full Application example.

💡 Good practices for NAIS workloads.