kind: Cluster
apiVersion: kind.sigs.k8s.io/v1alpha3
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 5432
hostPort: 5432
- containerPort: 80
hostPort: 8080
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: gitlab-postgresql
namespace: gitlab
spec:
replicas: 1
template:
metadata:
labels:
name: gitlab-postgresql
spec:
dnsPolicy: ClusterFirstWithHostNet
hostNetwork: true
containers:
- name: postgresql
image: sameersbn/postgresql:9.5-3
imagePullPolicy: Always
env:
- name: DB_USER
value: gitlab
- name: DB_PASS
value: +BP52QIxpT/flVCMpL3KXA==
- name: DB_NAME
value: gitlab_production
- name: DB_EXTENSION
value: pg_trgm
ports:
- name: postgres
containerPort: 5432
volumeMounts:
- mountPath: /var/lib/postgresql
name: data
livenessProbe:
exec:
command:
- pg_isready
- -h
- localhost
- -U
- postgres
initialDelaySeconds: 30
timeoutSeconds: 5
readinessProbe:
exec:
command:
- pg_isready
- -h
- localhost
- -U
- postgres
initialDelaySeconds: 5
timeoutSeconds: 1
volumes:
- name: data
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: gitlab-postgresql
namespace: gitlab
labels:
name: gitlab-postgresql
spec:
ports:
- name: postgres
port: 5432
targetPort: postgres
selector:
name: gitlab-postgresql
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
run: nginx
name: nginx
spec:
replicas: 1
selector:
matchLabels:
run: nginx
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
run: nginx
spec:
dnsPolicy: ClusterFirstWithHostNet
hostNetwork: true
containers:
- image: nginx
name: nginx
ports:
- containerPort: 80
resources: {}
status: {}