You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This module also provides a `KibanaContainer` for testing with [Kibana](https://www.elastic.co/kibana).
36
+
Kibana requires a connection to Elasticsearch and `KibanaContainer` supports two modes: managed and external.
37
+
38
+
### Managed mode
39
+
40
+
In managed mode, `KibanaContainer` automatically connects to an `ElasticsearchContainer`:
41
+
42
+
<!--codeinclude-->
43
+
[Kibana with Elasticsearch](../../modules/elasticsearch/src/test/java/org/testcontainers/elasticsearch/KibanaContainerTest.java) inside_block:managedModeCanStartAndReachElasticsearchInSameExplicitNetwork
44
+
<!--/codeinclude-->
45
+
46
+
When using managed mode with explicit networks, both containers must share the same `Network` instance.
47
+
Alternatively, you can omit the network configuration entirely, and `KibanaContainer` will do its best effort to create a shared, ad-hoc network automatically.
48
+
49
+
### External mode
50
+
51
+
In external mode, `KibanaContainer` connects to an external Elasticsearch instance via URL and using provided credentials:
52
+
53
+
<!--codeinclude-->
54
+
[Kibana with external Elasticsearch](../../modules/elasticsearch/src/test/java/org/testcontainers/elasticsearch/KibanaContainerTest.java) inside_block:externalModeCanWorkWithUsernamePassword
55
+
<!--/codeinclude-->
56
+
57
+
For external mode with HTTPS, use `withElasticsearchCaCertificate()` to provide the CA certificate.
58
+
You can authenticate using either username/password (`withElasticsearchCredentials()`) or service account tokens (`withElasticsearchServiceAccountToken()`).
59
+
33
60
## Adding this module to your project dependencies
34
61
35
62
Add the following dependency to your `pom.xml`/`build.gradle` file:
0 commit comments