Skip to content

Commit 347cad3

Browse files
authored
Merge pull request #5884 from influxdata/jts/dar-484-add-steps-to-install-kubit-in-an-air-gapped-environment
fix(clustered): set up clustered for air-gapped environments, add ins…
2 parents 4941aec + f62682e commit 347cad3

File tree

8 files changed

+744
-432
lines changed

8 files changed

+744
-432
lines changed

content/influxdb3/clustered/install/_index.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,22 @@ installing InfluxDB Clustered.
3737

3838
## Setup, configure, and deploy InfluxDB Clustered
3939

40-
{{< children type="ordered-list" >}}
40+
> [!Note]
41+
> #### Deploying in air-gapped environments
42+
>
43+
> To deploy InfluxDB Clustered in an air-gapped environment (without internet access),
44+
> use one of the following approaches:
45+
>
46+
> - **Recommended**: Directly use `kubit local apply`
47+
> - Helm (includes the kubit operator)
48+
> - Directly use the kubit operator
49+
>
50+
> For more information, see [Choose the right deployment tool for your environment](/influxdb3/clustered/install/set-up-cluster/configure-cluster/#choose-the-right-deployment-tool-for-your-environment)
4151
52+
{{< children type="ordered-list" >}}
4253

4354
<!-- TODO: ADD CLUSTER ARCHITECTURE OVERVIEW -->
44-
45-
<!--
46-
47-
-------- TODO: ALL THIS INFORMATION NEEDS TO LAND IN THE ADMIN SECTION ---------
55+
<!---------- TODO: ALL THIS INFORMATION NEEDS TO LAND IN THE ADMIN SECTION ---------
4856
4957
### Updating your InfluxDB Cluster
5058

content/influxdb3/clustered/install/set-up-cluster/configure-cluster/_index.md

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,64 @@ The AppInstance CRD is defined in a YAML file (use the `example-customer.yml`
2020
provided by InfluxData as a template).
2121

2222
We recommend editing the `AppInstance` resource directly as the primary method
23-
for configuring and managing your InfluxDB cluster. If you are required to use
24-
[Helm](https://helm.sh/), there is a InfluxDB Clustered Helm chart available
23+
for configuring and managing your InfluxDB cluster.
24+
After you have edited your `AppInstance`, use the `kubit` CLI or `kubectl` [deployment tool](/influxdb3/clustered/install/set-up-cluster/configure-cluster/#choose-the-right-deployment-tool-for-your-environment), depending on your requirements.
25+
26+
If you are required to use
27+
[Helm](https://helm.sh/), there is an InfluxDB Clustered Helm chart available
2528
that acts as a wrapper for the `AppInstance` resource and lets you use Helm to
2629
manage configuration changes in your InfluxDB cluster.
2730

31+
{{% expand-wrapper %}}
32+
{{% expand "Choose the right deployment tool for your environment" %}}
33+
34+
| Deployment Tool | Best For | Requirements | Considerations |
35+
|----------------|----------|--------------|----------------|
36+
| [**kubectl**](#when-to-use-kubectl) | Standard deployments | Cluster-wide permissions | Simplest option if you have required permissions |
37+
| [**kubit CLI**](#when-to-use-kubit-cli) | Limited permission environments or air-gapped | Local workstation access | Better for environments with permission restrictions |
38+
| [**Helm**](#when-to-use-helm) | Teams standardized on Helm | Helm installation (includes kubit operator) | Provides consistent deployment with other Helm-managed applications |
39+
40+
### When to use kubectl
41+
42+
Use the `kubectl` approach when:
43+
44+
- You have cluster-wide permissions to install CRDs
45+
- You prefer the simplest deployment method
46+
47+
> [!important]
48+
>
49+
> #### kubectl requires cluster-wide permissions
50+
>
51+
> InfluxDB Clustered uses an `AppInstance` Kubernetes custom resource (CR) to
52+
> configure and deploy your InfluxDB Cluster. Installing a `CustomResourceDefinition`
53+
> (CRD) requires cluster-wide permissions, so if you don't have these permissions,
54+
> `kubectl` may fail.
55+
56+
### When to use kubit CLI
57+
58+
Use the `kubit local apply` CLI approach when:
59+
60+
- You don't have permissions to install CRDs
61+
- You don't have permissions to install operators in the `kubit` namespace
62+
- You don't have permissions to create cluster-wide RBAC
63+
- You're working in an air-gapped environment
64+
- You want to preview generated YAML before applying
65+
- You don't want to run the operator in your cluster
66+
67+
The `kubit local apply` method is specifically designed to avoid having to install the operator in air-gapped environments, making it easier to implement. This approach processes the AppInstance resource on your local machine and then applies the resulting Kubernetes resources directly to the cluster without requiring the kubit operator to be running in the cluster.
68+
69+
### When to use Helm
70+
71+
Use the `Helm` approach when:
72+
73+
- Your team is standardized on Helm for Kubernetes deployments
74+
- You prefer consistent deployment methods across applications
75+
- You want simplified management of the full stack
76+
- You need better support for upgrades and rollbacks
77+
78+
The InfluxDB Clustered Helm chart includes the [kubecfg kubit operator](/influxdb3/clustered/install/set-up-cluster/configure-cluster/use-helm/#kubecfg-kubit-operator).
79+
80+
{{% /expand %}}
81+
{{% /expand-wrapper %}}
82+
2883
{{< children >}}

content/influxdb3/clustered/install/set-up-cluster/configure-cluster/directly.md

Lines changed: 44 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,15 @@ In both scenarios, you need a valid _pull secret_.
128128

129129
{{< tabs-wrapper >}}
130130
{{% tabs %}}
131-
[Public registry (non-air-gapped)](#)
131+
[Public registry](#)
132132
[Private registry (air-gapped)](#)
133133
{{% /tabs %}}
134134

135135
{{% tab-content %}}
136136

137137
<!--------------------------- BEGIN Public Registry --------------------------->
138138

139-
#### Public registry (non-air-gapped)
139+
#### Public registry
140140

141141
To pull from the InfluxData registry, you need to create a Kubernetes secret in the target namespace.
142142

@@ -161,40 +161,34 @@ If you change the name of the secret, you must also change the value of the
161161
{{% /tab-content %}}
162162
{{% tab-content %}}
163163

164-
<!--------------------------- BEGIN Private Registry -------------------------->
164+
<!--------------------------- BEGIN PRIVATE REGISTRY (AIR-GAPPED) -------------------------->
165165

166166
#### Private registry (air-gapped)
167167

168168
If your Kubernetes cluster can't use a public network to download container images
169-
from the InfluxData container registry, do the following:
169+
from the InfluxData container registry, follow these steps to copy images and
170+
configure the AppInstance for a private registry:
170171

171-
1. Copy the images from the InfluxData registry to your own private registry.
172-
2. Configure your `AppInstance` resource with a reference to your private
173-
registry name.
174-
3. Provide credentials to your private registry.
172+
1. [Copy the images to your private registry](#copy-the-images-to-your-private-registry)
173+
2. [Configure your AppInstance](#configure-your-appinstance)
175174

176-
##### Copy the images
175+
##### Copy the images to your private registry
177176

178-
We recommend using [crane](https://github.com/google/go-containerregistry/tree/main/cmd/crane)
179-
to copy images into your private registry.
177+
Use `crane` to copy images from the InfluxData registry to your own private registry.
180178

181-
1. [Install crane](https://github.com/google/go-containerregistry/tree/main/cmd/crane#installation)
182-
for your system.
183-
2. Use the following command to create a container registry secret file and
184-
retrieve the necessary secrets:
179+
1. [Install crane](https://github.com/google/go-containerregistry/tree/main/cmd/crane#installation)
180+
for your system.
181+
2. Create a container registry secret file and verify access:
185182

186183
{{% code-placeholders "PACKAGE_VERSION" %}}
187184

188-
<!-- pytest.mark.skip -->
189-
190185
```bash
191-
mkdir /tmp/influxdbsecret
186+
mkdir -p /tmp/influxdbsecret
192187
cp influxdb-docker-config.json /tmp/influxdbsecret/config.json
193188
DOCKER_CONFIG=/tmp/influxdbsecret \
194189
crane manifest \
195190
us-docker.pkg.dev/influxdb2-artifacts/clustered/influxdb:PACKAGE_VERSION
196191
```
197-
198192
{{% /code-placeholders %}}
199193

200194
---
@@ -244,8 +238,8 @@ manifest and the output is similar to the following error:
244238
Error: fetching manifest us-docker.pkg.dev/influxdb2-artifacts/clustered/influxdb:<package-version>: GET https://us-docker.pkg.dev/v2/token?scope=repository%3Ainfluxdb2-artifacts%2Fclustered%2Finfluxdb%3Apull&service=: DENIED: Permission "artifactregistry.repositories.downloadArtifacts" denied on resource "projects/influxdb2-artifacts/locations/us/repositories/clustered" (or it may not exist)
245239
```
246240

247-
The list of images that you need to copy is included in the package metadata.
248-
You can obtain it with any standard OCI image inspection tool--for example:
241+
3. Extract the list of InfluxDB images from the package metadata:
242+
You can use any standard OCI image inspection tool--for example:
249243

250244
{{% code-placeholders "PACKAGE_VERSION" %}}
251245

@@ -269,7 +263,7 @@ us-docker.pkg.dev/influxdb2-artifacts/iox/iox@sha256:b59d80add235f29b806badf7410
269263
...
270264
```
271265

272-
Use `crane` to copy the images to your private registry:
266+
4. Use `crane` to copy the images to your private registry:
273267

274268
{{% code-placeholders "REGISTRY_HOSTNAME" %}}
275269

@@ -289,49 +283,50 @@ with the hostname of your private registry--for example:
289283
myregistry.mydomain.io
290284
```
291285

292-
293286
##### Configure your AppInstance
294287

295-
Set the `spec.package.spec.images.registryOverride` field in your
296-
`myinfluxdb.yml` to the location of your private registry--for example:
288+
Configure your `AppInstance` resource with a reference to your private registry name.
297289

298-
{{% code-placeholders "REGISTRY_HOSTNAME" %}}
290+
In your `myinfluxdb.yml`:
299291

300-
```yml
292+
1. Set `spec.package.spec.images.registryOverride` to the location of your private registry.
293+
2. If your private container registry requires pull secrets to access images, set `spec.imagePullSecrets.name` to the pull secret name.
294+
295+
{{% expand-wrapper %}}
296+
{{% expand "View `myinfluxdb.yml` AppInstance configuration" %}}
297+
{{% code-placeholders "REGISTRY_HOSTNAME | PULL_SECRET_NAME" %}}
298+
```yaml
301299
apiVersion: kubecfg.dev/v1alpha1
302300
kind: AppInstance
303-
# ...
301+
metadata:
302+
name: influxdb
303+
namespace: influxdb
304304
spec:
305305
package:
306306
spec:
307307
images:
308308
registryOverride: REGISTRY_HOSTNAME
309-
```
310-
311-
{{% /code-placeholders %}}
312-
313-
314-
##### Provide credentials to your private registry
315-
316-
If your private container registry requires pull secrets to access images, you
317-
can create the required kubernetes secrets, and then configure them in your
318-
AppInstance resource--for example:
319-
320-
{{% code-placeholders "PULL_SECRET_NAME" %}}
321-
322-
```yml
323-
apiVersion: kubecfg.dev/v1alpha1
324-
kind: AppInstance
325-
# ...
326-
spec:
309+
# Configure connection to PostgreSQL database
310+
values:
311+
global:
312+
catalog:
313+
dsn: "postgres://username:password@postgres-host:5432/influxdb?sslmode=require"
314+
# Configure S3-compatible object storage
315+
objectStorage:
316+
bucket: "influxdb-bucket"
317+
endpoint: "https://s3-endpoint"
318+
accessKeyId: "ACCESS_KEY"
319+
secretAccessKey: "SECRET_KEY"
320+
region: "region"
321+
# Configure image pull secrets if needed
327322
imagePullSecrets:
328323
- name: PULL_SECRET_NAME
329324
```
330-
331325
{{% /code-placeholders %}}
326+
{{% /expand %}}
327+
{{% /expand-wrapper %}}
332328
333-
334-
<!---------------------------- END Private Registry --------------------------->
329+
<!---------------------------- END Private Registry (AIR-GAPPED) --------------------------->
335330
336331
{{% /tab-content %}}
337332
{{< /tabs-wrapper >}}

0 commit comments

Comments
 (0)