Advanced Orchestrated container deployment (Helm)

Deploy CARTO Self-hosted using Kubernetes and Helm

Estimated time: Completing this deployment guide is expected to take approximately 3 hours. This estimate may vary based on individual familiarity with the technology stack involved and the complexity of your organization's environment.

This guide provides step-by-step instructions for deploying CARTO Self-Hosted on a Kubernetes cluster.

1. Prerequisites

Before you begin, ensure you have the following tools and assets ready.

To deploy CARTO Self-Hosted on Kubernetes, you need:

  • A CARTO Self-Hosted installation package containing your environment configuration and a license key. The package has two YAML files: carto-secrets.yaml and carto-values.yaml If you don't have it yet, you can ask for it at [email protected].

  • A domain you own, to which you can add a DNS record.

  • A Kubernetes cluster. To create a cluster, see documentation on Google Cloud Platform, AWS, and Azure. This cluster must fit our hardware and software requirements for Kubernetes.

  • A working installation of kubectl. To install kubectl, see documentation on Google Cloud Platform, AWS, and Azure.

  • Kubectl installed on your CLI.

  • A working installation of Helm v3 on version 3.6.0 or later.

  • Troubleshoot.sh installed to run the preflight checks (view step 4.)

1.2 Required Tools

1.3 Required ssets

  • CARTO Installation Package: You should have received a package from CARTO support containing two key files:

    • carto-values.yaml: Contains the base configuration.

    • carto-secrets.yaml: Contains your license and private credentials.

    • If you don't have it yet, you can ask for it at [email protected].

  • Kubernetes Cluster: A running cluster that meets CARTO's hardware and software requirements.

  • External PostgreSQL Database: A running PostgreSQL instance accessible from your cluster.

  • Cloud Storage Buckets: Pre-configured storage buckets on a supported provider (GCS, S3, or Azure Blob). You must visit the guide: Configure your own buckets (Helm)

  • DNS name and Certificate: You'll need a domain you own, to which you can add a DNS record.

2. Add your minimal customization

2.1 Understanding and reparing customizations.yaml

Throughout this guide, you will be asked to configure various settings for your specific environment. All these settings will be placed in a single file that you create called customizations.yaml.

2.1.1 Overview

The CARTO Helm chart uses a layered configuration approach:

  1. carto-values.yaml: Contains the default application settings (provided by CARTO). Do not edit this file.

  2. carto-secrets.yaml: Contains your license and private credentials (provided by CARTO). Do not edit this file.

  3. customizations.yaml: Contains your overrides and environment-specific settings. This is the only file you will modify.

When you run the installation, Helm merges these files, with the values in your customizations.yaml taking precedence.

2.1.2 Getting started: create empty customizations.yaml

Before you begin, create an empty file in your working directory named customizations.yaml. We recommend to have this along side the Customer Packages files (carto-values.yaml & carto-secrets.yaml)

2.1.3 Customizations.yaml example:

After completing the "Domain" and "External Database" steps, your customizations.yaml file will look like this:

2.2 Domain

Add to the customizations.yaml file the domain name you want to use

A full domain is required. You cannot install CARTO in a domain path like https://my.domain.com/carto

3. External database

3.1 Overview

At this point, we are setting up the configuration of the external database. You need to provide:

  • An existing logical database

  • A user with full permissions over the logical database

  • The password for the user so that we can connect to the database

If you're installing in EKS and you'd like to use EKS Pod Identity to authenticate to your RDS PostgreSQL database, follow this guide. When you setup EKS Pod Identity you can skip this steps, you'll need to follow the details in the specified guide.

  1. Create the secret with the PostgreSQL user password:

  1. Edit customizations.yaml:

    1. user: The carto user that you created.

    2. user-password: The password for the user that you created.

    3. database: The database that you've created.

3.2 Optional: Database connection SSL

In some scenarios, an SSL connection to the external database is required. In that case, you should add to customizations.yaml:

4. Configure your storage buckets

CARTO Self-hosted platform needs access to some storage buckets to save some resources needed by the platform. These buckets are in charge of storing assets such as imported datasets, map snapshots and custom markers.

You can create and use your own storage buckets in any of the following supported storage providers:

And in order to configure them, there is a detailed guide "Configure your Own Buckets (Helm)" available that you should follow to complete the Self-Hosted configuration process.

5. Add Helm repository

At this point you should have your customization.yaml file populated with:

  • Your metadata database connection information.

  • Your buckets connection attributes

To add the CARTO Helm repo:

  1. Type this command to add the helm repository

  1. If you already have the repo, update it:

  1. Search for the repo to confirm you can access the carto chart.

Create a file customizations.yaml with the domain name you want to use

  • user: The carto user that you created.

  • user-password: The password for the user that you created.

  • database: The database that you've created.

In some scenarios, an SSL connection to the external database is required. In that case, you should add to customizations.yaml:

6. Execute the preflight checks

Before installing CARTO Self-Hosted, you can use preflight checks to validate your configuration. Keep iterating until all checks pass—this ensures that your environment is fully prepared for installation.

As mentioned in the Requisites, you need to install the Trobleshoot.sh tools in order to run the Preflight checks. To install this tool using bash, you have to run the following commands:

  1. Install the preflight and support-bundle plugins:

  1. Check version

Use the following command to run the preflight checks:

The previous command performs validation checks to ensure that your customizations.yaml file is correctly configured for installing the CARTO platform and that you're infrastructure is ready to host a CARTO Self-Hosted installation.

Once the checks are complete, you will see the following output in your terminal:

If you encounter any issues during the preflight checks, verify the following:

  • PostgreSQL Configuration: Ensure your PostgreSQL credentials are correctly set up and that the database is accessible from your cluster.

  • External Proxy: If using an external proxy, confirm that it is correctly configured for connecting to external domains.

  • Egress Requirements: Check that your environment meets the necessary egress requirements for CARTO Self-Hosted.

  • Storage Configuration: Verify that your storage buckets are correctly set up and that the provided credentials are valid.

By addressing these areas, you can resolve common setup issues and proceed with a smooth installation.

7. Install CARTO

Use the following command to install CARTO in your Kubernetes cluster.

After installing CARTO, verify you have the required pods running by running the following command (It can take up to 5 minutes to have everything running):

8. Optional: Port-forward to localhost

After configuring CARTO App ingress you can manually test you can reach the platform by using forwarding to localhost.

Once all the services are running, verify the installation by port forwarding to localhost. Execute the following:

Add to your /etc/hosts the domain you will use:

echo "127.0.0.1 my.domain.com" >> /etc/hosts

9. Configure an HTTPS endpoint

The entry point to the CARTO Self-Hosted is through the router service. By default, it is configured in ClusterIP mode, and it's only accessible in your machine with kubectl port-forward).

The first step here is to make the router accessible using a LoadBalancer. This provides an externally-accessible IP address that we will later configure our DNS.

Add to customizations.yaml based on the cloud you are using:

After that, upgrade the cluster:

Get the EXTERNAL-IP of your CARTO Self-Hosted deployment with this command:

At this point, you need to configure a DNS record that points my.domain.com to the EXTERNAL-IP (34.136.204.51).

Use your own TLS certificate

By default, the package generates a self-signed certificate with a validity of 365 days.

If you want to add your own certificate you need to create a secret:

Edit customizations.yaml:

Apply the changes:

If your TLS certificate key is protected with a passphrase the CARTO Self-hosted installation won't be able to work as expected. You can easily generate a new key file without passphrase protection using the following command:

10. Post-installation checks

In order to verify CARTO Self Hosted was correctly installed, and it's functional, we recommend performing the following checks:

  1. Sign in to your Self Hosted, create a user and a new organization.

  2. Go to the Connections page, in the left-hand menu, create a new connection to one of the available providers.

  3. Go to the Data Explorer page, click on the Upload button right next to the Connections panel. Import a dataset from a local file.

  4. Go back to the Maps page, and create a new map.

  5. In this new map, add a new layer from a table using the connection created in step 3.

  6. Create a new layer from a SQL Query to the same table. You can use a simple query like:

  1. Create a new layer from the dataset imported in step 4.

  2. Make the map public, copy the sharing URL and open it in a new incognito window.

  3. Go back to the Maps page, and verify your map appears there, and the map thumbnail represents the latest changes you made to the map.

Congrats! Once you've configured your custom buckets, you should have a production-ready deployment of CARTO Self-Hosted at https://my.domain.com

You may notice that the onboarding experience (demo maps, demo workflows...) and the Data Observatory-automated features (subscriptions, enrichment...) are disabled by default in your new organization, because the CARTO Data Warehouse is not enabled.

If you'd like to enable the onboarding experience and the Data Observatory features, follow the guide to enable the CARTO Data Warehouse or contact [email protected].

If you prefer not to enable the CARTO Data Warehouse, you can still use the Data Observatory without the UI features: after getting in touch, our team can deliver the data (both premium and public subscriptions) manually to your data warehouse.

Analytics Toolbox in CARTO Self-Hosted

To fully leverage CARTO's capabilities you need to gain access to the Analytics Toolbox functions. This step is crucial to fully leverage CARTO's capabilities. Please refer to the documentation of your data warehouse provider for detailed instructions:

Troubleshooting

The following standard commands of kubectl could be used to debug possible issues that might arise:

kubectl logs and kubectl describe

Database

The container workspace-migrations (included at the pod carto-workspace-api-*) will be responsible for creating a new user carto_worskpace_admin and a database carto_workspace.

To debug possible errors with the connection of the external database you might need to check the logs of this container:

For further assistance check our Support page.

Last updated

Was this helpful?