Documentation

Deploy your InfluxDB cluster

Use Kubernetes and related tools to deploy your InfluxDB cluster. This guide provides instructions for deploying your InfluxDB cluster using the following tools:

  • kubectl: CLI for controlling the Kubernetes cluster manager
  • kubit: A Kubernetes controller that can render and apply jsonnet templates based on the kubecfg jsonnet tooling and framework
  • helm: Uses the InfluxDB Clustered Helm chart, which includes the kubit operator.

To compare these tools and deployment methods, see Choose the right deployment tool for your environment.

Prerequisites

If you haven’t already set up and configured your cluster, see how to install InfluxDB Clustered.

kubectl standard deployment (with internet access)

Use the kubectl apply command to apply your custom-configured myinfluxdb.yml and deploy your InfluxDB cluster:

kubectl apply \
  --filename myinfluxdb.yml \
  --namespace influxdb
  • Copy
  • Fill window

Due to the additional complexity and maintenance requirements, using kubectl apply isn’t recommended for air-gapped environments. Instead, consider using the kubit CLI approach, which is specifically designed for air-gapped deployments.

Standard and air-gapped deployments

This approach avoids the need for installing the kubit operator in the cluster, making it ideal for air-gapped clusters.

For air-gapped deployment, ensure you have configured access to a private registry for InfluxDB images.

  1. On a machine with internet access, download the kubit CLI–for example:

    curl -L -o kubit https://github.com/kubecfg/kubit/archive/refs/tags/v0.0.20.tar.gz
    chmod +x kubit
    
    • Copy
    • Fill window

    Replace v0.0.20 with the latest release version.

  2. If deploying InfluxDB in an air-gapped environment (without internet access), transfer the binary to your air-gapped environment.

  3. Use the kubit local apply command to process your custom-configured myinfluxdb.yml locally and apply the resulting resources to your cluster:

    # Point to Docker credentials that have access to your registry
    # (public registry for standard deployments or private registry for air-gapped)
    DOCKER_CONFIG=/path/to/credentials kubit local apply myinfluxdb.yml
    
    • Copy
    • Fill window

    If your local system doesn’t have required tools installed, use Docker mode:

    # For Linux or macOS
    DOCKER_CONFIG=/path/to/credentials kubit local apply --docker myinfluxdb.yml
    
    • Copy
    • Fill window

The kubit local apply command processes your AppInstance resource locally and applies the resulting Kubernetes resources directly to your cluster.

Helm standard deployment (with internet access)

  1. Add the InfluxData Helm chart repository:

    helm repo add influxdata https://helm.influxdata.com/
    
    • Copy
    • Fill window
  2. Update your Helm repositories to ensure you have the latest charts:

    helm repo update
    
    • Copy
    • Fill window
  3. Deploy the InfluxDB Clustered Helm chart with your customized values.yaml:

    helm install influxdb influxdata/influxdb3-clustered \
      -f values.yaml \
      --namespace influxdb \
      --create-namespace
    
    • Copy
    • Fill window

If you need to update your deployment after making changes to your values.yaml, use the helm upgrade command:

helm upgrade influxdb influxdata/influxdb3-clustered \
  -f values.yaml \
  --namespace influxdb
  • Copy
  • Fill window

Helm air-gapped deployment

  1. On a machine with internet access, download the Helm chart:

    # Add the InfluxData repository
    helm repo add influxdata https://helm.influxdata.com/
    
    # Update the repositories
    helm repo update
    
    # Download the chart as a tarball
    helm pull influxdata/influxdb3-clustered --version X.Y.Z
    
    • Copy
    • Fill window

    Replace X.Y.Z with the specific chart version you want to use.

  2. Transfer the chart tarball to your air-gapped environment using your secure file transfer method.

  3. In your air-gapped environment, install the chart from the local tarball and values from your customized values.yaml:

    helm install influxdb ./influxdb3-clustered-X.Y.Z.tgz \
      -f values.yaml \
      --namespace influxdb \
      --create-namespace
    
    • Copy
    • Fill window
  4. Verify the deployment:

    kubectl get pods -n influxdb
    
    • Copy
    • Fill window

If you need to update your deployment after making changes to your values.yaml, use the helm upgrade command:

helm upgrade influxdb ./influxdb3-clustered-X.Y.Z.tgz \
  -f values.yaml \
  --namespace influxdb
  • Copy
  • Fill window

kubit’s role in air-gapped environments

When deploying with Helm in an air-gapped environment:

  1. Helm deploys the kubit operator - The Helm chart includes the kubit operator, which needs its images mirrored to your private registry
  2. Operator requires access to all InfluxDB images - The kubit operator deploys the actual InfluxDB components using images from your private registry
  3. Registry override is essential - You must set the images.registryOverride and configure the kubit operator images correctly in the values file

This is why you need to mirror InfluxDB images and kubit operator images for air-gapped deployments.

Check deployment status

Kubernetes deployments take some time to complete. To check on the status of a deployment, use the kubectl get command:

The following example uses the yq command-line YAML parser to parse and format the YAML output. You can also specify the output as json and use the jq command-line JSON parser to parse and format the JSON output. Installing and using either of these utilities is optional.

kubectl get \
  --filename myinfluxdb.yml \
  --output yaml | yq -P .status.conditions
  • Copy
  • Fill window

The status field in the output contains two useful fields:

  • conditions: Summary of the current state of the deployment
  • lastLogs: Verbose logs of deployment stages

For example, if you have incorrect container registry credentials, the output is similar to the following:

- lastTransitionTime: '2023-08-18T12:53:54Z'
  message: ''
  observedGeneration: null
  reason: Failed
  status: 'False'
  type: Reconcilier
- lastTransitionTime: '2023-08-18T12:53:54Z'
  message: |
    Cannot launch installation job: OCI error: Authentication failure: {"errors":[{"code":"UNAUTHORIZED","message":"authentication failed"}]}
  observedGeneration: null
  reason: Failed
  status: 'False'
  type: Ready
  • Copy
  • Fill window

Inspect cluster pods

After deploying your InfluxDB cluster, use the following command to list all the deployed pods:

kubectl get pods --namespace influxdb
  • Copy
  • Fill window

This command returns a collection of pods similar to the following:

NAMESPACE     NAME                                      READY   STATUS      RESTARTS       AGE
influxdb      minio-0                                   2/2     Running     2 (101s ago)   114s
influxdb      catalog-db-0                              2/2     Running     0              114s
influxdb      keycloak-b89bc7b77-zpt2r                  1/1     Running     0              114s
influxdb      debug-service-548749c554-m4sxk            1/1     Running     0              91s
influxdb      token-gen-56a2e859-zlvnw                  0/1     Completed   0              91s
influxdb      database-management-579bfb9fcb-dw5sv      1/1     Running     0              91s
influxdb      database-management-579bfb9fcb-22qgm      1/1     Running     0              91s
influxdb      authz-59f456795b-qt52p                    1/1     Running     0              91s
influxdb      account-df457db78-j9z6f                   1/1     Running     0              91s
influxdb      authz-59f456795b-ldvmt                    1/1     Running     0              91s
influxdb      account-df457db78-8ds4f                   1/1     Running     0              91s
influxdb      token-management-754d966555-fmkbk         1/1     Running     0              90s
influxdb      token-management-754d966555-rbvtv         1/1     Running     0              90s
influxdb      global-gc-7db9b7cb4-ml6wd                 1/1     Running     0              91s
influxdb      iox-shared-compactor-0                    1/1     Running     1 (62s ago)    91s
influxdb      iox-shared-ingester-0                     1/1     Running     1 (62s ago)    91s
influxdb      iox-shared-ingester-1                     1/1     Running     1 (62s ago)    91s
influxdb      iox-shared-ingester-2                     1/1     Running     1 (62s ago)    91s
influxdb      global-router-86cf6b869b-56skm            3/3     Running     1 (62s ago)    90s
influxdb      iox-shared-querier-7f5998b9b-fpt62        4/4     Running     1 (62s ago)    90s
influxdb      kubit-apply-influxdb-g6qpx                0/1     Completed   0              8s
  • Copy
  • Fill window

Troubleshoot deploying InfluxDB Clustered

Common issues

  1. Image pull errors

    • Check that registry override and image pull secrets are properly configured
    • For air-gapped: Verify all images are mirrored and registryOverride is correctly set
  2. Missing kubit binary

    • Ensure you’ve transferred the correct version of kubit for your platform
    • Verify the binary has executable permissions
  3. Kubit operator failures in air-gapped environments

    • Ensure you’ve properly mirrored all kubit operator images and configured their references in your values file.
  4. PostgreSQL connectivity issues

    • Verify network connectivity to your PostgreSQL database
    • Check that database credentials are correct in your configuration

Was this page helpful?

Thank you for your feedback!


The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Read more

InfluxDB 3 Core and Enterprise are now in Beta

InfluxDB 3 Core and Enterprise are now available for beta testing, available under MIT or Apache 2 license.

InfluxDB 3 Core is a high-speed, recent-data engine that collects and processes data in real-time, while persisting it to local disk or object storage. InfluxDB 3 Enterprise is a commercial product that builds on Core’s foundation, adding high availability, read replicas, enhanced security, and data compaction for faster queries. A free tier of InfluxDB 3 Enterprise will also be available for at-home, non-commercial use for hobbyists to get the full historical time series database set of capabilities.

For more information, check out: