Self-managed Cortex
For organizations with strict security and compliance requirements, Cortex can be deployed on-premises into your own Kubernetes cluster.
The Cortex installation is provided as a Helm chart.
Additional self-managed resources
After following the instructions on this page to get started with your self-managed Cortex account, see these additional guides to enable other features and integrations:
User management: Enabling SSO, connecting users via GitHub OAuth, configuring email notifications
Configuring integrations: Atlassian Connect app, AWS, GitHub app, GitHub OAuth, Microsoft Teams, Slack
Upgrades and rollbacks: Upgrading or rolling back Self-Managed Cortex
Getting started with a Cortex self-managed account
To deploy Cortex on-premises, you will:
Make sure you have the required environment and infrastructure set up
Create a PostgreSQL database where Cortex data will be stored
Create Kubernetes secrets for pulling software images and connecting to the database
Create a YAML file containing your configuration values for the Cortex Helm chart
Preview the Kubernetes deployment
Deploy using Helm
Configure DNS records to allow users to access Cortex
Prerequisites
See the prerequisites below:
Step 1: Set up a persistent database
Cortex stores all persistent data in a PostgreSQL database. You will need to set up a database in order to install and use Cortex.
Step 2: Configure your Kubernetes cluster
Step 3: Add the Cortex repo to Helm
Step 4: Configure and install the helm chart
Step 5: Configure DNS
After installation, Kubernetes will create two load balancers: one for the frontend and one for the backend. Configure your DNS records:
Additional configuration for a cloud cluster installation
If you're installing Cortex into a cloud cluster, for example EKS or GKE, you may need to install required plugins to your cluster. For example, kubectl apply
the nginx plugin for AWS.
Backup and recovery
As a best practice, we recommend regularly backing up the following:
Your Kubernetes secrets
To get copies of your Kubernetes secrets as YAML files that can be restored using
kubectl apply
, use commands like the following:
kubectl get secret cortex-docker-registry-secret -n cortex -o yaml > cortex-docker-registry-secret.yaml
kubectl get secret cortex-secret -n cortex -o yaml > cortex-secret.yaml
Your overrides.yaml file
This contains all the configuration values for your Cortex installation. We recommend keeping this file in a revision control system.
Your PostgresSQL database
This contains all of your Cortex data. We recommend that you implement a regular backup schedule and periodically test restore procedures.
Recovery process
Create namespace if it doesn't exist:
kubectl create namespace cortex
Restore PostgreSQL database from backup
Apply Kubernetes secrets to the cortex namespace
Install Cortex using your saved
overrides.yaml
and the appropriate version
Backup and recovery best practices
Don't fork or modify the Helm chart: If you fork or modify the Helm chart itself, it will be much more difficult to obtain timely support from Cortex. If it seems like the chart needs to be modified, please reach out to your Cortex team to see if there are value overrides available, or if Cortex can modify the official Helm chart to meet your needs.
Version Control: Keep your
overrides.yaml
in version controlDocumentation: Document any custom configurations or integrations
Testing: Always test upgrades in non-production first
Monitoring: Set up monitoring for Cortex components
Regular Updates: Stay current with Cortex releases for security and feature updates
Backup Verification: Regularly test your backup and restore process
Additional configuration options
Modifying the configuration after installing
You can make changes to your configuration by editing overrides.yaml
and applying them using helm upgrade
. First, identify the Cortex version you are running - the Cortex version appears at the bottom of the left-hand nav in the settings page in the Cortex UI. Cortex version numbers look like 0.0.411
.
Next, preview the changes:
helm diff upgrade cortex cortex/cortex \
--namespace cortex \
--version <your-Cortex-version> \
-f overrides.yaml
Read the output carefully to be sure that no unexpected changes will be made. Finally, apply the updated configuration using helm upgrade
:
helm upgrade cortex cortex/cortex \
--namespace cortex \
--version <your-Cortex-version> \
-f overrides.yaml
Self-Managed SSL Certificates
This configuration is used when Cortex needs to act as a client connecting to other services in your infrastructure that use self-signed or private CA certificates. Common use cases include:
Connecting to a self-hosted GitLab instance with custom certificates
Accessing internal APIs that use private certificate authorities
Integrating with on-premises services using self-signed certificates
Configuration
Before getting started, note the following prerequisites and considerations:
Follow these steps to add a certificate to the trusted keystores:
Create a kubernetes secret in the same namespace as your Cortex helm installation called
tls.cert
, containing the contents of the certificate file:
kubectl create secret generic tls-secret \
--namespace cortex \
--from-literal tls.crt="$(cat my_cert_file.txt)"
In your
overrides.yaml
file, enableselfSignedCerts
and ensure the secret name is the same as the one created in the last step. In the example below, the secret is calledtls-secret
:
app:
...
backend:
enabled: true
...
selfSignedCerts:
enable: true
secret: tls-secret
worker:
enabled: true
...
selfSignedCerts:
enable: true
secret: tls-secret
Repeat the previous step for each service in your
overrides.yaml
where you want to use the provided certificate.Preview and apply the updated configuration by following the steps in Modifying the configuration after installing above.
Troubleshoot certificate issues
Enabling Redis
Cortex provides optional Redis support by provisioning Redis in Kubernetes as part of the Helm chart. Enable Redis to gain support for outbound rate limiting of integration API calls. Without enabling Redis, Cortex will still function, but may not have rate limiting capabilities for external API calls.
Redis is enabled via a third-party Helm chart; a full reference to all of the possible settings can be found in this repository on GitHub.
Set authentication for Redis
In production environments, it is recommended that you enable authentication.
Embedded Redis upgrades
The vendor Cortex uses to provide an embedded Redis solution, Bitnami, is sunsetting their Helm chart as of August 28, 2025. If you are using embedded Redis (you have redis.enabled = true
in your Helm chart values), you must take action to ensure service continuity. Expand the tile below for instructions.
If you are not using Redis, or you are using an externally managed Redis such as AWS Elasticache, no action is required.
Monitor Redis usage
You can monitor Redis usage to ensure it's properly sized:
Enabling metrics
Prometheus
Prometheus metrics provide visibility into Cortex's performance and health, enabling:
Performance monitoring: Track response times, request rates, and error rates
Resource utilization: Monitor memory usage, CPU consumption, and thread pools
Integration health: Track success or failure rates for external API calls
Alerting: Set up alerts for degraded performance or failures
Capacity planning: Understand usage patterns to plan scaling
Expand the tile below to learn how to publish Prometheus metrics and configure your Prometheus instance to scrape pods directly.
Access Prometheus metrics
Expand the tile below to see some of the available metrics and how to access them.
Add Prometheus annotations
Example alerting rules
See an example of Prometheus alerting rules for Cortex:
Create a Cortex-specific Grafana dashboard
Troubleshoot Prometheus metrics issues
Enabling feature flags
Occasionally, Cortex may ask you to enable a feature flag. To do so, add settings to the app.shared.featureFlags
map in your overrides.yaml
:
app:
shared:
featureFlags:
example.flag: true
Preview and apply the updated configuration by following the steps in Modifying the configuration after installing above.
Getting Help
When working with Cortex Customer Support, you will be asked to collect diagnostic data using a tool we distribute called brain-freeze
. To install brain-freeze
, follow this link to the latest release, and download the .tar.gz file that matches the operating system and architecture where you are running kubectl. Extract the file on the machine where you are running kubectl, and put the enclosed brain-freeze binary somewhere in your path. Then you can run:
brain-freeze k8s logs --namespace cortex --timeInMinutes 1440
brain-freeze k8s dump --namespace cortex --helm-deployment cortex
This will create a data
subdirectory in your current directory, containing the Kubernetes logs from your deployment from the last 24 hours (1440 minutes) and the details of your Kubernetes deployment configuration.
The brain-freeze CLI does not dump sensitive information. The values of secrets are masked.
Product analytics
Cortex collects basic, anonymized data from self-managed customers. If you would like to opt out, please reach out to your Cortex Customer Success Manager.
Last updated
Was this helpful?