text stringlengths 0 59.1k |
|---|
$kubectl get pods |
NAME READY REASON RESTARTS AGE |
[...] |
rethinkdb-rc-r4tb0 1/1 Running 0 1m |
``` |
**Done!** |
--- |
Scale |
----- |
You can scale up your cluster using `kubectl scale`. The new pod will join to the existing cluster automatically, for example |
```sh |
$kubectl scale rc rethinkdb-rc --replicas=3 |
scaled |
$kubectl get pods |
NAME READY REASON RESTARTS AGE |
[...] |
rethinkdb-rc-f32c5 1/1 Running 0 1m |
rethinkdb-rc-m4d50 1/1 Running 0 1m |
rethinkdb-rc-r4tb0 1/1 Running 0 3m |
``` |
Admin |
----- |
You need a separate pod (labeled as role:admin) to access Web Admin UI |
```sh |
kubectl create -f examples/storage/rethinkdb/admin-pod.yaml |
kubectl create -f examples/storage/rethinkdb/admin-service.yaml |
``` |
find the service |
```console |
$kubectl get services |
NAME CLUSTER_IP EXTERNAL_IP PORT(S) SELECTOR AGE |
[...] |
rethinkdb-admin 10.0.131.19 104.197.19.120 8080/TCP db=rethinkdb,role=admin 10m |
rethinkdb-driver 10.0.27.114 <none> 28015/TCP db=rethinkdb 20m |
``` |
We request an external load balancer in the [admin-service.yaml](admin-service.yaml) file: |
``` |
type: LoadBalancer |
``` |
The external load balancer allows us to access the service from outside the firewall via an external IP, 104.197.19.120 in this case. |
Note that you may need to create a firewall rule to allow the traffic, assuming you are using Google Compute Engine: |
```console |
$ gcloud compute firewall-rules create rethinkdb --allow=tcp:8080 |
``` |
Now you can open a web browser and access to *http://104.197.19.120:8080* to manage your cluster. |
**Why not just using pods in replicas?** |
This is because kube-proxy will act as a load balancer and send your traffic to different server, |
since the ui is not stateless when playing with Web Admin UI will cause `Connection not open on server` error. |
- - - |
**BTW** |
* `gen_pod.sh` is using to generate pod templates for my local cluster, |
the generated pods which is using `nodeSelector` to force k8s to schedule containers to my designate nodes, for I need to access persistent data on my host dirs. Note that one needs to label the node before 'nodeSelector' can work, see this [tutorial](https://kubernetes.io/docs/user-guide/node-selection/) |
* see [antmanler/rethinkdb-k8s](https://github.com/antmanler/rethinkdb-k8s) for detail |
<|endoftext|> |
# source: k8s_examples/_archived/storage/rethinkdb/driver-service.yaml type: yaml |
apiVersion: v1 |
kind: Service |
metadata: |
labels: |
db: rethinkdb |
name: rethinkdb-driver |
spec: |
ports: |
- port: 28015 |
targetPort: 28015 |
selector: |
db: rethinkdb |
<|endoftext|> |
# source: k8s_examples/_archived/storage/hazelcast/hazelcast-deployment.yaml type: yaml |
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.