Created
June 15, 2020 14:09
-
-
Save haroonb/5a955dc7ddd414cf0cafa62fb6738aed to your computer and use it in GitHub Desktop.
pgpool-2 k8s
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl logs pgpool-846569b89c-kp9zr pgpool | |
2020-06-15 14:05:25: pid 10: FATAL: 0 is outside the valid range for parameter "backend_port0" (1024 .. 65535) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: pgpool | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: pgpool | |
template: | |
metadata: | |
labels: | |
app: pgpool | |
spec: | |
containers: | |
- name: pgpool | |
image: pgpool/pgpool:4.1 | |
env: | |
- name: POSTGRES_USER | |
valueFrom: | |
secretKeyRef: | |
name: postgres.acid-postgres-cluster.credentials | |
key: username | |
- name: POSTGRES_PASSWORD | |
valueFrom: | |
secretKeyRef: | |
name: postgres.acid-postgres-cluster.credentials | |
key: password | |
- name: PGPOOL_PARAMS_BACKEND_HOSTNAME0 | |
value: "acid-postgres-cluster.default.svc.cluster.local" | |
- name: PGPOOL_PARAMS_BACKEND_HOSTNAME1 | |
value: "acid-postgres-cluster-repl.default.svc.cluster.local" | |
- name: PGPOOL_PARAMS_BACKEND_APPLICATION_NAME0 | |
value: "acid-postgres-cluster" | |
- name: PGPOOL_PARAMS_BACKEND_APPLICATION_NAME1 | |
value: "acid-postgres-cluster-repl" | |
- name: backend_port0 | |
value: "5432" | |
- name: backend_port1 | |
value: "5432" | |
- name: pgpool-stats | |
image: pgpool/pgpool2_exporter:1.0 | |
env: | |
- name: POSTGRES_USER | |
valueFrom: | |
secretKeyRef: | |
name: postgres.acid-postgres-cluster.credentials | |
key: username | |
- name: POSTGRES_PASSWORD | |
valueFrom: | |
secretKeyRef: | |
name: postgres.acid-postgres-cluster.credentials | |
key: password | |
- name: PGPOOL_SERVICE | |
value: "localhost" | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: pgpool | |
spec: | |
selector: | |
app: pgpool | |
ports: | |
- name: pgpool-port | |
protocol: TCP | |
port: 9999 | |
targetPort: 9999 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: pgpool-stats | |
labels: | |
app: pgpool-stats | |
annotations: | |
prometheus.io/path: /metrics | |
prometheus.io/port: "9719" | |
prometheus.io/scrape: "true" | |
spec: | |
selector: | |
app: pgpool | |
ports: | |
- name: pgpool-stats-port | |
protocol: TCP | |
port: 9719 | |
targetPort: 9719 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment