No port 8000 in the Dgraph Kubernetes yaml file

What I want to do

I am following the section “Single Server” guide at

to install Dgraph by

kubectl create --filename

At step
it asks me to run

kubectl port-forward pod/dgraph-0 8080:8080
kubectl port-forward pod/dgraph-0 8000:8000

For the second command, I got error

kubectl port-forward pod/dgraph-0 --namespace=dgraph 8000:8000
Forwarding from → 8000
Forwarding from [::1]:8000 → 8000
Handling connection for 8000
E0722 08:08:16.362445 14604 portforward.go:400] an error occurred forwarding 8000 → 8000: error forwarding port 8000 to pod fb33342b921b5574640bb19deef6f50346310cdc457d5fcb9f7c386ed34c19dc, uid : failed to execute portforward in network namespace “/var/run/netns/cni-b2767f2f-481b-0fe7-2d4f-ebe18202627f”: failed to dial 8000: dial tcp4 connect: connection refused

When I further check the Kubernetes file at

I didn’t find the port 8000 is being used inside.

I am wondering is the Kubernetes tutorial out-of-date? And what is correct way? Thanks!

Dgraph metadata

Dgraph version: v21.03

You will find many issues on here pointing out documentation that has not been properly updated to remove ratel (the port 8000 website). In v21.03+ the recommended use of ratel is by using and connecting to the http port on your alpha from there (often for those running this with port-forward or locally).

When ratel was included it just produced the same html,css,js that gives you anyway so it is exactly the same as running locally - unless you are running in some sort of walled garden without access to the internet, which is very uncommon. In that case you can run your own ratel using the ratel container.

1 Like

Thanks @iluminae , it would be great to update the tutorial!
I spent over a hour to figure out what happened… :sweat_smile:
It can also save the Dgraph team to answer these issues due to out-of-date tutorials :grinning: