Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Introduction to Elasticsearch  ›  Capstone Project

Running Elasticsearch: Docker, Elastic Cloud and the Kibana Console

Running with Docker 12 minYou can run a node in Docker or rent one on Elastic Cloud, check it answers on port 9200 with a login, and then send requests from Kibana's Console.

Running Elasticsearch: Docker, Elastic Cloud and the Kibana Console

Reading about requests only goes so far; you learn Elasticsearch by sending them. There are two quick ways to get a cluster — run it yourself in Docker, or rent one on Elastic Cloud — and one comfortable place to type requests: Kibana's Console.

The rule

Start a node, prove it answers on 9200, then work from the Console.

Docker is the fastest way to run Elasticsearch on your laptop. A single development node:

docker network create elastic
docker run --name es01 --net elastic -p 9200:9200 -m 1GB \
  -e "discovery.type=single-node" \
  docker.elastic.co/elasticsearch/elasticsearch:8.15.0
  • Port 9200 is the HTTP API you send requests to.
  • discovery.type=single-node tells the node not to look for partners.
  • In version 8, security is on by default: the first start prints a password for the built-in elastic user and an enrollment token for Kibana. Traffic uses HTTPS with a self-signed certificate.

Prove it answers:

curl -k -u elastic:YOUR_PASSWORD https://localhost:9200

A JSON reply with the cluster name and "number": "8.15.0" means you are in. (-k accepts the self-signed certificate — fine on a laptop, never in production.)

Elastic Cloud is the hosted option run by Elastic. You pick a cloud provider and region, and it gives you an endpoint URL, a password and a ready Kibana. Nothing to install — good when you want a real cluster without looking after servers.

Kibana runs on port 5601. Paste the enrollment token when it asks, log in as elastic, then open Dev Tools → Console. The Console is where this course's examples live:

GET /

You type a verb and path, add a JSON body underneath if needed, and run it with the play button or Ctrl+Enter. It auto-completes endpoints and field names, handles the address and login for you, and can copy any request as a curl command.

The shortcut

Every setup is the same three checks: Is it running? Can I reach 9200? Am I authenticated? Work through them in order when something fails.

"Connection refused" after docker runStep 1 of 3
  1. Is it running?

    docker ps shows es01 restarting — the node crashed. Its logs show it ran out of memory, so give Docker more.

Drills

Answer fast — trust the rule.

quick drill

Which port does Elasticsearch's HTTP API listen on by default?

quick drill

In a default Elasticsearch 8 Docker node, curl http://localhost:9200 fails but curl -k -u elastic:pw https://localhost:9200 works. Why?

quick drill

What does Elastic Cloud give you?

quick drill

Where in Kibana do you type raw requests like GET /books/_search?

Remember

  • Start a node, prove it answers on 9200, then work from the Console.
  • Version 8 is secure by default: HTTPS plus the elastic user's password.
  • Debug in order: running? reachable on 9200? authenticated?

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainDebug a failed connection

A teammate ran Elasticsearch 8 in Docker and says curl http://localhost:9200 does not work. Explain the checks you would make, in order, and what you expect to fix.