Skip to main content
Kubernetes is an open-source container orchestration system that automates the deployment, scaling, and management of containerized applications. You can connect Kubernetes to , and deploy within your Kubernetes clusters. This guide explains how to connect a Kubernetes cluster to , configure persistent storage, and deploy in your kubernetes cluster.

Prerequisites

To follow the steps on this page:

Integrate TimescaleDB in a Kubernetes cluster

To connect your Kubernetes cluster to your :
  1. Create a default namespace for your components
    1. Create a namespace:
    2. Set this namespace as the default for your session:
    For more information, see Kubernetes Namespaces.
  2. Create a Kubernetes secret that stores your credentials Update the following command with your connection details, then run it:
  3. Configure network access to
    • Managed Kubernetes: outbound connections to external databases like work by default. Make sure your cluster’s security group or firewall rules allow outbound traffic to IP.
    • Self-hosted Kubernetes: If your cluster is behind a firewall or running on-premise, you may need to allow egress traffic to . Test connectivity using your connection details:
      If the connection fails, check your firewall rules.
  4. Create a Kubernetes deployment that can access your Run the following command to apply the deployment:
  5. Test the connection
    1. Create and run a pod that uses the connection details you added to timescale-secret in the timescale namespace:
    2. Launch a psql shell in the test-pod you just created:
    You start a psql session connected to your .
You have successfully integrated Kubernetes with .