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-nodetells 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
elasticuser 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:9200A 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.
Is it running?
docker psshowses01restarting — the node crashed. Its logs show it ran out of memory, so give Docker more.
Drills
Answer fast — trust the rule.
Which port does Elasticsearch's HTTP API listen on by default?
In a default Elasticsearch 8 Docker node, curl http://localhost:9200 fails but curl -k -u elastic:pw https://localhost:9200 works. Why?
What does Elastic Cloud give you?
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
elasticuser's password. - Debug in order: running? reachable on 9200? authenticated?
