text stringlengths 0 59.1k |
|---|
pxc-node3 pxc-node3 capttofu/percona_xtradb_cluster_5_6:beta name=pxc-node3 1 |
NAME READY STATUS RESTARTS AGE |
pxc-node1-h6fqr 1/1 Running 0 41m |
pxc-node2-sfqm6 1/1 Running 0 41m |
pxc-node3-017b3 1/1 Running 0 40m |
NAME LABELS SELECTOR IP(S) PORT(S) |
pxc-cluster <none> unit=pxc-cluster 10.100.179.58 3306/TCP |
pxc-node1 <none> name=pxc-node1 10.100.217.202 3306/TCP |
4444/TCP |
4567/TCP |
4568/TCP |
pxc-node2 <none> name=pxc-node2 10.100.47.212 3306/TCP |
4444/TCP |
4567/TCP |
4568/TCP |
pxc-node3 <none> name=pxc-node3 10.100.200.14 3306/TCP |
4444/TCP |
4567/TCP |
4568/TCP |
``` |
The cluster should be ready for use! |
### Connecting to the cluster |
Using the name of ```pxc-cluster``` service running interactively using ```kubectl exec```, it is possible to connect to any of the pods using the mysql client on the pod's container to verify the cluster size, which should be ```3```. In this example below, pxc-node3 replication controller is chosen, and to find out t... |
``` |
$ kubectl get pods|grep pxc-node3|awk '{ print $1 }' |
pxc-node3-0b5mc |
$ kubectl exec pxc-node3-0b5mc -i -t -- mysql -u root -p -h pxc-cluster |
Enter password: |
Welcome to the MySQL monitor. Commands end with ; or \g. |
Your MySQL connection id is 5 |
Server version: 5.6.24-72.2-56-log Percona XtraDB Cluster (GPL), Release rel72.2, Revision 43abf03, WSREP version 25.11, wsrep_25.11 |
Copyright (c) 2009-2015 Percona LLC and/or its affiliates |
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. |
Oracle is a registered trademark of Oracle Corporation and/or its |
affiliates. Other names may be trademarks of their respective |
owners. |
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. |
mysql> show status like 'wsrep_cluster_size'; |
+--------------------+-------+ |
| Variable_name | Value | |
+--------------------+-------+ |
| wsrep_cluster_size | 3 | |
+--------------------+-------+ |
1 row in set (0.06 sec) |
``` |
At this point, there is a working cluster that can begin being used via the pxc-cluster service IP address! |
### TODO |
This setup certainly can become more fluid and dynamic. One idea is to perhaps use an etcd container to store information about node state. Originally, there was a read-only kubernetes API available to each container but that has since been removed. Also, Kelsey Hightower is working on moving the functionality of confd... |
<|endoftext|> |
# source: k8s_examples/_archived/storage/rethinkdb/admin-pod.yaml type: yaml |
apiVersion: v1 |
kind: Pod |
metadata: |
labels: |
db: rethinkdb |
role: admin |
name: rethinkdb-admin |
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/admin-service.yaml type: yaml |
apiVersion: v1 |
kind: Service |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.