Last active
July 17, 2019 10:03
-
-
Save Fodoj/a4d5e20c3909e01d2df0d9d4b570b77e to your computer and use it in GitHub Desktop.
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
# 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: {} |
Updated the port, thanks
What about the second error? any idea?
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
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