Prerequisites
To follow the steps on this page:- Install self-managed Kubernetes or sign up for a Kubernetes Turnkey Cloud Solution.
- Install kubectl for command-line interaction with your cluster.
Integrate TimescaleDB in a Kubernetes cluster
To connect your Kubernetes cluster to your :
-
Create a default namespace for your components
-
Create a namespace:
-
Set this namespace as the default for your session:
-
Create a namespace:
-
Create a Kubernetes secret that stores your credentials
Update the following command with your connection details, then run it:
-
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.
-
Create a Kubernetes deployment that can access your
Run the following command to apply the deployment:
-
Test the connection
-
Create and run a pod that uses the connection details you added to
timescale-secretin thetimescalenamespace: -
Launch a psql shell in the
test-podyou just created:
psqlsession connected to your . -
Create and run a pod that uses the connection details you added to