> For the complete documentation index, see [llms.txt](https://docs.mftlabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mftlabs.io/getting-started/installation/kubernetes.md).

# Kubernetes

AMPS can be deployed in a Kubernetes Cluster using the AMPS helm chart. All the tutorials under the Kubernetes section use the following tools:

* [**Helm**](https://helm.sh/docs/intro/install/) **-** A CLI tool for managing and installing Helm charts.
* [**kubectl**](https://kubernetes.io/docs/tasks/tools/) or [**oc**](https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/getting-started-cli.html) **-** CLI tools that manage your Kubernetes Cluster. oc is used in the OpenShift environment, all other environments use kubectl.&#x20;

After installing helm, add the mftlabs repository by running the following command.

```
helm repo add mftlabs https://helm.mftlabs.io
```

Within the MFTLabs Helm Chart Repository is the AMPS Helm chart. The AMPS Helm chart brings together AMPS and its dependencies, MongoDB and Nats, into a single chart and provides a number of values parameters that can be easily manipulated to configure AMPS.  Below is a sample values.yaml file detailing all the configurable options along with their default values. Feel free to copy it and edit the values as you desire. These values parameters are outlined in more detail further below the sample file.&#x20;

```
ui:
  admin_host: admin.localhost
  user_host: localhost
  http_port: 80
  ssl:
    enabled: false
    force: false
    port: 443
    key: 
    cert: 
    gen_certs: false
    domains: 
    emails: "info@agiledatainc.com"
    certmode: local

ports: 
  - name: sftp
    protocol: TCP
    port: 15022
    targetPort: 15022
  - name: api
    protocol: TCP
    port: 1234
    targetPort: 1234

modules:
  size: 1Gi
  # storageClassName:

cfg:
  size: 1Gi
  # storageClassName:

misc:
  size: 1Gi
  # storageClassName: 

db:
  default: true
  size: 20Gi
  # storageClassName:

defaultStorageClass:

replicas: 1

archiving:
  enabled: false

existingSecret: 
```

| Name                     | Description                                                                                                                                                                                                                                                                                                                                                          | Value                   |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
| timezone                 | The fullname of the timezone to set on the AMPS container.                                                                                                                                                                                                                                                                                                           | America/Chicago         |
| ui.adminhost             | The hostname to route to the admin portal.                                                                                                                                                                                                                                                                                                                           | admin.localhost         |
| ui.userhost              | The hostname to route to the user portal.                                                                                                                                                                                                                                                                                                                            | localhost               |
| ui.http\_port            | The port at which to serve the admin and user portals via HTTP.                                                                                                                                                                                                                                                                                                      | 80                      |
| ui.ssl.enabled           | Whether to enable SSL for the AMPS UIs.                                                                                                                                                                                                                                                                                                                              | false                   |
| ui.ssl.force             | Whether to force and redirect the AMPS UIs to SSL.                                                                                                                                                                                                                                                                                                                   | false                   |
| ui.ssl.port              | The port at which to serve the admin and user portals via HTTPS.                                                                                                                                                                                                                                                                                                     | 443                     |
| ui.ssl.gen\_certs        | Whether AMPS should generate certificates using the configured admin host, user host, and additional domains.                                                                                                                                                                                                                                                        | false                   |
| ui.ssl.domains           | A comma separated list of additional domains to include in the certificate.                                                                                                                                                                                                                                                                                          |                         |
| ui.ssl.emails            | A comma separated list of emails to use when performing SSL certification.                                                                                                                                                                                                                                                                                           | <info@agiledatainc.com> |
| certmode                 | The certificate generation mode to use. “local” generates self-signed certificates for use in development. “production” generates certificates using certbot.                                                                                                                                                                                                        | local                   |
| ui.ssl.key               | A string path to the location of the SSL key on the container used when not using ui.ssl.gen\_certs.                                                                                                                                                                                                                                                                 |                         |
| ui.ssl.cert              | A string path to the location of the SSL certificate on the container used when not using ui.ssl.gen\_certs.                                                                                                                                                                                                                                                         |                         |
| ports\[]                 | A list of ports to expose via the “amps-svc-ui” load balancer.                                                                                                                                                                                                                                                                                                       |                         |
| ports\[].name            | A label for a port configuration.                                                                                                                                                                                                                                                                                                                                    |                         |
| ports\[].protocol        | The protocol to use for a port configuration. Should be TCP, UDP, HTTP, or HTTPS                                                                                                                                                                                                                                                                                     |                         |
| ports\[].port            | The container port to expose.                                                                                                                                                                                                                                                                                                                                        |                         |
| ports\[].targetPort      | The port on which the load balancer should serve the service running on the specified container port.                                                                                                                                                                                                                                                                |                         |
| modules.size             | Specifies the size of the modules volume claim.                                                                                                                                                                                                                                                                                                                      | 1Gi                     |
| modules.storageClassName | Specifies the storage class to use for modules.                                                                                                                                                                                                                                                                                                                      |                         |
| cfg.size                 | Specifies the size of config volume claim.                                                                                                                                                                                                                                                                                                                           | 1Gi                     |
| cfg.storageClassName     | Specifies the storage class to use for config.                                                                                                                                                                                                                                                                                                                       |                         |
| misc.size                | Specifies the size of the miscellaneous directory                                                                                                                                                                                                                                                                                                                    | 1Gi                     |
| misc.storageClassName    | Specifies the storage class to use for miscellaneous.                                                                                                                                                                                                                                                                                                                |                         |
| db.default               | Whether to use the default mongodb chart (true) or instead start a simple single container mongodb deployment (useful in more restrictive environments).                                                                                                                                                                                                             | true                    |
| db.size                  | When default is false, specifies the size of the db directory.                                                                                                                                                                                                                                                                                                       | 20Gi                    |
| db.storageClassName      | Specifies the storage class to use for the db directory.                                                                                                                                                                                                                                                                                                             |                         |
| defaultStorageClass      | Specifies the storage class to default to if a specific storageclass is not set under a particular volume’s configuration. If neither this configuration nor a volume specific storageclass is set, the default cluster storageclass is used.                                                                                                                        |                         |
| replicas                 | The number of replicas of AMPS to create. (Currently only supports 1)                                                                                                                                                                                                                                                                                                | 1                       |
| archiving.enabled        | Whether to also spin up a MinIO cluster to use for S3 archiving. By default creates a bucket named archive. Must be set on chart installation.                                                                                                                                                                                                                       |                         |
| existingSecret           | By default the chart creates a Kubernetes Secret with the Erlang Cookie and Phoenix Secret Key Base to use for AMPS. Alternatively you can use this configuration to give the name of an existing secret that has a cookie key set to a cryptographically secure, random 32 digit string and a keybase key set to a random cryptographically secure 64 digit string. |                         |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mftlabs.io/getting-started/installation/kubernetes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
