No port 8000 in the Dgraph Kubernetes yaml file

What I want to do

I am following the section “Single Server” guide at
https://dgraph.io/docs/deploy/kubernetes/#single-server

to install Dgraph by

kubectl create --filename https://raw.githubusercontent.com/dgraph-io/dgraph/master/contrib/config/kubernetes/dgraph-single/dgraph-single.yaml

At step https://dgraph.io/docs/deploy/kubernetes/#test-single-server-setup
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 127.0.0.1:8000 → 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 127.0.0.1:8000: connect: connection refused

When I further check the Kubernetes file at
https://raw.githubusercontent.com/dgraph-io/dgraph/master/contrib/config/kubernetes/dgraph-single/dgraph-single.yaml

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 play.dgraph.io and connecting to the http port on your alpha from there (often http://127.0.0.1:8080 for those running this with port-forward or locally).

When ratel was included it just produced the same html,css,js that play.dgraph.io 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: