enroll-nodes.asciidoc 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. [role="exclude"]
  2. When {es} starts for the first time, the security auto-configuration process
  3. binds the HTTP layer to both `_site_` and `_local_`, but only binds the
  4. transport layer to `_local_`. This intended behavior ensures that you can start
  5. a single-node cluster with security enabled by default without any additional
  6. configuration.
  7. Before enrolling a new node, additional actions such as binding to an address
  8. other than `localhost` or satisfying bootstrap checks are typically necessary
  9. in production clusters. During that time, an auto-generated enrollment token
  10. could expire, which is why enrollment tokens aren't generated automatically.
  11. Additionally, only nodes on the same host can join the cluster without
  12. additional configuration. If you want nodes from another host to join your
  13. cluster, you need to set `transport.host` to a
  14. {ref}/modules-network.html#network-interface-values[supported value] other than
  15. `_local_` (such as `_site_`), or an IP address that's bound to an interface
  16. where other hosts can reach it. Refer to
  17. {ref}/modules-network.html#transport-settings[transport settings] for more
  18. information.
  19. To enroll new nodes in your cluster, create an enrollment token with the
  20. `elasticsearch-create-enrollment-token` tool on any existing node in your
  21. cluster. You can then start a new node with the `--enrollment-token` parameter
  22. so that it joins an existing cluster.
  23. . In a separate terminal from where {es} is running, navigate to the directory
  24. where you installed {es} and run the
  25. <<create-enrollment-token,`elasticsearch-create-enrollment-token`>> tool
  26. to generate an enrollment token for your new nodes.
  27. +
  28. ["source","sh",subs="attributes"]
  29. ----
  30. bin{slash}elasticsearch-create-enrollment-token -s node
  31. ----
  32. +
  33. Copy the enrollment token, which you'll use to enroll new nodes with
  34. your {es} cluster.
  35. . From the installation directory of your new node, start {es} and pass the
  36. enrollment token with the `--enrollment-token` parameter.
  37. +
  38. ["source","sh",subs="attributes"]
  39. ----
  40. bin{slash}elasticsearch --enrollment-token <enrollment-token>
  41. ----
  42. +
  43. {es} automatically generates certificates and keys in the following directory:
  44. +
  45. ["source","sh",subs="attributes"]
  46. ----
  47. config{slash}certs
  48. ----
  49. . Repeat the previous step for any new nodes that you want to enroll.