Skip to content

Instantly share code, notes, and snippets.

@Fodoj Fodoj/postgresql.yaml
Last active Jul 17, 2019

Embed
What would you like to do?
# Generation of Kubernetes YAML is still under development!
#
# Save the output of this file and use kubectl create -f to import
# it into Kubernetes.
#
# Created with podman-1.4.2
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: "2019-06-22T14:21:20Z"
labels:
app: postgresql
name: postgresql
spec:
containers:
- env:
- name: PATH
value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- name: TERM
value: xterm
- name: HOSTNAME
- name: container
value: podman
- name: DATA_SOURCE_NAME
value: postgresql://postgres:password@localhost:5432/postgres?sslmode=disable
image: docker.io/wrouesnel/postgres_exporter:latest
name: cockymirzakhani
ports:
- containerPort: 9187
hostPort: 9187
protocol: TCP
resources: {}
securityContext:
allowPrivilegeEscalation: true
capabilities: {}
privileged: false
readOnlyRootFilesystem: false
workingDir: /
- command:
- docker-entrypoint.sh
- postgres
env:
- name: PATH
value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/postgresql/11/bin
- name: TERM
value: xterm
- name: HOSTNAME
- name: container
value: podman
- name: PG_MAJOR
value: "11"
- name: PG_VERSION
value: 11.4-1.pgdg90+1
- name: PGDATA
value: /var/lib/postgresql/data
- name: POSTGRES_PASSWORD
value: password
- name: GOSU_VERSION
value: "1.11"
- name: LANG
value: en_US.utf8
image: docker.io/library/postgres:latest
name: eloquentleakey
ports:
- containerPort: 5432
hostPort: 5432
protocol: TCP
resources: {}
securityContext:
allowPrivilegeEscalation: true
capabilities: {}
privileged: false
readOnlyRootFilesystem: false
workingDir: /
status: {}
@iMilad

This comment has been minimized.

Copy link

commented Jul 17, 2019

Hi,
port on the postgres should be 5432, Error --> listen tcp4 :9187: bind: address already in use
Somewhere it should be define that the postgres image belongs to POD, i get this error:
container 0306e03d depends on container 72987beaf1d0 which is in a pod - containers not in pods cannot depend on containers in pods: invalid argument

@Fodoj

This comment has been minimized.

Copy link
Owner Author

commented Jul 17, 2019

Updated the port, thanks

@iMilad

This comment has been minimized.

Copy link

commented Jul 17, 2019

What about the second error? any idea?

@iMilad

This comment has been minimized.

Copy link

commented Jul 17, 2019

ok found the problem, the script is not working with version lower than 1.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.