text stringlengths 0 59.1k |
|---|
metadata: |
labels: |
db: rethinkdb |
name: rethinkdb-admin |
spec: |
ports: |
- port: 8080 |
targetPort: 8080 |
type: LoadBalancer |
selector: |
db: rethinkdb |
role: admin |
<|endoftext|> |
# source: k8s_examples/_archived/storage/rethinkdb/rc.yaml type: yaml |
apiVersion: v1 |
kind: ReplicationController |
metadata: |
labels: |
db: rethinkdb |
name: rethinkdb-rc |
spec: |
replicas: 1 |
selector: |
db: rethinkdb |
role: replicas |
template: |
metadata: |
labels: |
db: rethinkdb |
role: replicas |
spec: |
containers: |
- image: registry.k8s.io/rethinkdb:1.16.0_1 |
name: rethinkdb |
env: |
- name: POD_NAMESPACE |
valueFrom: |
fieldRef: |
fieldPath: metadata.namespace |
ports: |
- containerPort: 8080 |
name: admin-port |
- containerPort: 28015 |
name: driver-port |
- containerPort: 29015 |
name: cluster-port |
volumeMounts: |
- mountPath: /data/rethinkdb_data |
name: rethinkdb-storage |
volumes: |
- name: rethinkdb-storage |
emptyDir: {} |
<|endoftext|> |
# source: k8s_examples/_archived/storage/rethinkdb/README.md type: docs |
RethinkDB Cluster on Kubernetes |
============================== |
Setting up a [rethinkdb](http://rethinkdb.com/) cluster on [kubernetes](http://kubernetes.io) |
**Features** |
* Auto configuration cluster by querying info from k8s |
* Simple |
Quick start |
----------- |
**Step 1** |
Rethinkdb will discover its peer using endpoints provided by kubernetes service, |
so first create a service so the following pod can query its endpoint |
```sh |
$kubectl create -f examples/storage/rethinkdb/driver-service.yaml |
``` |
check out: |
```sh |
$kubectl get services |
NAME CLUSTER_IP EXTERNAL_IP PORT(S) SELECTOR AGE |
rethinkdb-driver 10.0.27.114 <none> 28015/TCP db=rethinkdb 10m |
[...] |
``` |
**Step 2** |
start the first server in the cluster |
```sh |
$kubectl create -f examples/storage/rethinkdb/rc.yaml |
``` |
Actually, you can start servers as many as you want at one time, just modify the `replicas` in `rc.ymal` |
check out again: |
```sh |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.