Kubernetes Configuration Update - cluster + missing dgraph-ratel
The current documented cluster configuration for Kubernetes didn't quite work for me. Various things seem to have changed and dgraph-ratel was also missing.
I was able to get dgraph working on a 1.8.4 cluster and added dgraph-ratel via the attached configuration.
I have updated the config https://docs.dgraph.io/master/deploy/#cluster-setup and it works with Kubernetes v1.8.4. Can you give this a try? I didn't get the error about the volume storage class that you were talking about. @alexmilowski how do you deploy to your kubernetes cluster?
Also, dgraph-ratel doesn't need to be a stateful set as it doesn't have any state.
The service configuration will still route inconsistently. Because all the pods share the same label, some requests will get routed to the wrong place (e.g., a server request on 8080 can route to dgraph-zero pod).
I still had to separate the services and change the service labels. See the example below:
# This is the service that should be used by the clients of Dgraph to talk to the server.
# It exposes a ClusterIP that will automatically load balance connections the the different Dgraph
# Servers.
apiVersion: v1
kind: Service
metadata:
name: dgraph-public-server
labels:
app: dgraph
spec:
type: LoadBalancer
ports:
- port: 8080
targetPort: 8080
name: server-http
- port: 9080
targetPort: 9080
name: server-grpc
selector:
app: dgraph-server
---
# This is the service that should be used by the clients of Dgraph to talk to the server.
# It exposes a ClusterIP that will automatically load balance connections the the different Dgraph
# Servers.
apiVersion: v1
kind: Service
metadata:
name: dgraph-public-zero
labels:
app: dgraph
spec:
type: LoadBalancer
ports:
- port: 5080
targetPort: 5080
name: zero-grpc
- port: 6080
targetPort: 6080
name: zero-http
selector:
app: dgraph-zero
---
# This is the service that should be used by the clients of Dgraph to talk to the server.
# It exposes a ClusterIP that will automatically load balance connections the the different Dgraph
# Servers.
apiVersion: v1
kind: Service
metadata:
name: dgraph-public-ui
labels:
app: dgraph
spec:
type: LoadBalancer
ports:
- port: 8081
targetPort: 8081
name: ratel-http
selector:
app: dgraph-ui
With that change, It worked.
Updated k8s manifest files on the master.