content/influxdb3/clustered/install/set-up-cluster/deploy.md
Use Kubernetes and related tools to deploy your InfluxDB cluster. This guide provides instructions for deploying your InfluxDB cluster using the following tools:
To compare these tools and deployment methods, see Choose the right deployment tool for your environment.
If you haven't already set up and configured your cluster, see how to install InfluxDB Clustered.
<!-- Hidden anchor for links to the kubectl/kubit/helm tabs --><span id="kubectl-kubit-helm"></span>
{{< tabs-wrapper >}} {{% tabs %}} kubectl kubit CLI helm {{% /tabs %}} {{% tab-content %}}
<!------------------------------- BEGIN kubectl ------------------------------->Use the kubectl apply command to apply your custom-configured myinfluxdb.yml
and deploy your InfluxDB cluster:
kubectl apply \
--filename myinfluxdb.yml \
--namespace influxdb
<!-------------------------------- END kubectl -------------------------------->[!Note] Due to the additional complexity and maintenance requirements, using
kubectl applyisn't recommended for air-gapped environments. Instead, consider using thekubitCLI approach, which is specifically designed for air-gapped deployments.
{{% /tab-content %}} {{% tab-content %}}
<!-------------------------------- BEGIN kubit CLI -------------------------------->This approach avoids the need for installing the kubit operator in the cluster, making it ideal for air-gapped clusters.
[!Important] For air-gapped deployment, ensure you have configured access to a private registry for InfluxDB images.
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.22.tar.gz
chmod +x kubit
Replace {{% code-placeholder-key %}}v0.0.22{{% /code-placeholder-key%}} with the latest release version.
If deploying InfluxDB in an air-gapped environment (without internet access), transfer the binary to your air-gapped environment.
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
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
The kubit local apply command processes your AppInstance resource locally and
applies the resulting Kubernetes resources directly to your cluster.
{{% /tab-content %}} {{% tab-content %}}
<!-------------------------------- BEGIN Helm --------------------------------->Add the InfluxData Helm chart repository:
helm repo add influxdata https://helm.influxdata.com/
Update your Helm repositories to ensure you have the latest charts:
helm repo update
Deploy the InfluxDB Clustered Helm chart with your customized values.yaml:
helm install influxdb influxdata/influxdb3-clustered \
-f values.yaml \
--namespace influxdb \
--create-namespace
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
[!Important] For air-gapped deployment, ensure you have configured access to a private registry for InfluxDB images and the kubit operator.
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
Replace X.Y.Z with the specific chart version you want to use.
Transfer the chart tarball to your air-gapped environment using your secure file transfer method.
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
Verify the deployment:
kubectl get pods -n influxdb
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
<!--------------------------------- END Helm ---------------------------------->[!Note]
kubit's role in air-gapped environments
When deploying with Helm in an air-gapped environment:
- Helm deploys the kubit operator - The Helm chart includes the kubit operator, which needs its images mirrored to your private registry
- Operator requires access to all InfluxDB images - The kubit operator deploys the actual InfluxDB components using images from your private registry
- Registry override is essential - You must set the
images.registryOverrideand configure the kubit operator images correctly in the values fileThis is why you need to mirror InfluxDB images and kubit operator images for air-gapped deployments.
{{% /tab-content %}} {{< /tabs-wrapper >}}
Kubernetes deployments take some time to complete. To check on the status of a
deployment, use the kubectl get command:
[!Note] The following example uses the
yqcommand-line YAML parser to parse and format the YAML output. You can also specify the output asjsonand use thejqcommand-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
The status field in the output contains two useful fields:
conditions: Summary of the current state of the deploymentlastLogs: Verbose logs of deployment stagesFor 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
After deploying your InfluxDB cluster, use the following command to list all the deployed pods:
kubectl get pods --namespace influxdb
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
Image pull errors
registryOverride is correctly setMissing kubit binary
Kubit operator failures in air-gapped environments
PostgreSQL connectivity issues
{{< page-nav prev="/influxdb3/clustered/install/set-up-cluster/licensing/" prevText="Install your license" next="/influxdb3/clustered/install/set-up-cluster/test-cluster/" nextText="Test your cluster" >}}