Skip to content

Instantly share code, notes, and snippets.

@Fodoj
Last active July 17, 2019 10:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fodoj/a4d5e20c3909e01d2df0d9d4b570b77e to your computer and use it in GitHub Desktop.
Save Fodoj/a4d5e20c3909e01d2df0d9d4b570b77e to your computer and use it in GitHub Desktop.
# 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: {}
@Fodoj
Copy link
Author

Fodoj commented Jul 17, 2019

Updated the port, thanks

@iMilad
Copy link

iMilad commented Jul 17, 2019

What about the second error? any idea?

@iMilad
Copy link

iMilad 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