-
Notifications
You must be signed in to change notification settings - Fork 729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Init Elasticsearch spec asciidoc #1174
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
[id="{p}-elasticsearch-specification"] | ||
== Elasticsearch Specification | ||
|
||
There are a number of settings which need to be considered before going into production related to Elasticsearch but also to Kubernetes. | ||
|
||
Basic settings | ||
|
||
- JVM heap size | ||
- Node configuration | ||
- HTTP settings & TLS SANs | ||
- Resource limits | ||
- Pod Template | ||
- Volume claim templates | ||
|
||
Advanced settings | ||
|
||
- Virtual memory | ||
- Custom HTTP certificate | ||
- Secure settings | ||
- Custom plugins and bundles | ||
- Init containers for plugin downloads | ||
- Pod disruption budget | ||
- Change budget (maxUnavailable, maxSurge) | ||
|
||
[id="{p}-node-configuration"] | ||
=== Node configuration | ||
|
||
Any setting that can be configured in the `elasticsearch.yml` configuration file can be defined for each topology of nodes in the `spec.nodes[?].config` section. | ||
|
||
[source,yaml] | ||
---- | ||
spec: | ||
nodes: | ||
- nodeCount: 3 | ||
config: | ||
node.master: true | ||
node.data: false | ||
node.ingest: false | ||
node.ml: false | ||
xpack.ml.enabled: true | ||
cluster.remote.connect: false | ||
- nodeCount: 10 | ||
config: | ||
node.master: false | ||
node.data: true | ||
node.ingest: true | ||
node.ml: true | ||
cluster.remote.connect: false | ||
---- | ||
|
||
For more information on Elasticsearch settings, see https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html[Configuring Elasticsearch]. | ||
|
||
[id="{p}-http-settings-tls-sans"] | ||
=== HTTP settings & TLS SANs | ||
|
||
You can change the type of the Kubernetes service used to expose Elasticsearch in https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types[different ways] in the `spec.http.service.spec` section. | ||
|
||
[source,yaml] | ||
---- | ||
spec: | ||
http: | ||
service: | ||
spec: | ||
type: LoadBalancer | ||
---- | ||
|
||
You can add an IP or a DNS name in the SAN of the self-signed certificate configured by default to secure the HTTP layer with TLS in the `spec.http.tls.selfSignedCertificate` section. | ||
|
||
[source,yaml] | ||
---- | ||
spec: | ||
http: | ||
tls: | ||
selfSignedCertificate: | ||
subjectAltNames: | ||
- ip: 1.2.3.4 | ||
- dns: hulk.example.com | ||
---- | ||
|
||
[id="{p}-custom-http-certificate"] | ||
=== Custom HTTP certificate | ||
|
||
You can provide your own CA and certificates instead of the self-signed certificate to connect to Elasticsearch via HTTPS using a Kubernetes secret. | ||
|
||
You need to reference the name of a secret that contains a TLS private key and a certificate (or a chain), in the `spec.http.tls.certificate` section. | ||
|
||
[source,yaml] | ||
---- | ||
spec: | ||
http: | ||
tls: | ||
certificate: | ||
secretName: my-cert | ||
---- | ||
|
||
Example to create a Kubernetes TLS secret with a self-signed certificate: | ||
|
||
[source,sh] | ||
---- | ||
$ openssl req -x509 -newkey rsa:4096 -keyout tls.key -out tls.crt -days 365 -nodes | ||
$ kubectl create secret tls my-cert --cert tls.crt --key tls.key | ||
---- |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this sentence sounds a bit strange, @alaudazzi what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree it sounds a bit odd. This comes from https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html ...
We agreed with @alaudazzi that she will make a global pass when we have covered all the settings.