# k8s_examples_pxc-node3.yaml
apiVersion: v1
kind: Service
metadata:
  name: pxc-node3
  labels:
    node: pxc-node3
spec:
  ports:
    - port: 3306
      name: mysql
    - port: 4444
      name: state-snapshot-transfer
    - port: 4567
      name: replication-traffic
    - port: 4568
      name: incremental-state-transfer
  selector:
    node: pxc-node3

---
apiVersion: v1
kind: ReplicationController
metadata:
  name: pxc-node3
spec:
  replicas: 1
  template:
    metadata:
      labels:
        node: pxc-node3
        unit: pxc-cluster
    spec:
      containers:
        - resources:
            limits:
              cpu: 0.3
          image: capttofu/percona_xtradb_cluster_5_6:beta
          name: pxc-node3
          ports:
            - containerPort: 3306
            - containerPort: 4444
            - containerPort: 4567
            - containerPort: 4568
          env:
            - name: GALERA_CLUSTER
              value: "true"
            - name: WSREP_CLUSTER_ADDRESS
              value: gcomm://
            - name: WSREP_SST_USER
              value: sst
            - name: WSREP_SST_PASSWORD
              value: sst
            - name: MYSQL_USER
              value: mysql
            - name: MYSQL_PASSWORD
              value: mysql
            - name: MYSQL_ROOT_PASSWORD
              value: c-krit