Last active
April 28, 2022 06:22
-
-
Save Rishi16royy/25ad462ef2d8e354f4d283abf900ad40 to your computer and use it in GitHub Desktop.
Yaml for setting up konga on Kubernetes cluster.
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: v1 | |
kind: Namespace | |
metadata: | |
name: konga | |
labels: | |
app.kubernetes.io/name: konga | |
app.kubernetes.io/part-of: konga | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: konga | |
namespace: konga | |
annotations: | |
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp | |
service.beta.kubernetes.io/aws-load-balancer-type: nlb | |
service.beta.kubernetes.io/aws-load-balancer-internal: "true" | |
service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "false" | |
labels: | |
app.kubernetes.io/name: konga | |
app.kubernetes.io/part-of: konga | |
spec: | |
type: LoadBalancer | |
ports: | |
- name: konga-proxy | |
port: 80 | |
targetPort: 1337 | |
protocol: TCP | |
selector: | |
app: konga | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: konga | |
namespace: konga | |
labels: | |
app.kubernetes.io/name: konga | |
app.kubernetes.io/part-of: konga | |
app: konga | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: konga | |
template: | |
metadata: | |
labels: | |
name: konga | |
app: konga | |
spec: | |
containers: | |
- name: konga | |
env: | |
- name: DB_ADAPTER | |
value: postgres | |
- name: DB_HOST | |
value: postgres | |
- name: DB_USER | |
value: konga | |
- name: DB_PASSWORD | |
value: konga | |
- name: DB_DATABASE | |
value: konga | |
- name: KONGA_LOG_LEVEL | |
value: debug | |
image: pantsel/konga | |
ports: | |
- containerPort: 1337 | |
--- | |
apiVersion: apps/v1 | |
kind: StatefulSet | |
metadata: | |
name: postgres | |
namespace: konga | |
labels: | |
app.kubernetes.io/name: konga | |
app.kubernetes.io/part-of: konga | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: postgres | |
serviceName: postgres | |
template: | |
metadata: | |
labels: | |
app: postgres | |
spec: | |
containers: | |
- env: | |
- name: POSTGRES_USER | |
value: konga | |
- name: POSTGRES_PASSWORD | |
value: konga | |
- name: POSTGRES_DB | |
value: konga | |
- name: PGDATA | |
value: /var/lib/postgresql/data/pgdata | |
image: postgres:9.5 | |
name: postgres | |
ports: | |
- containerPort: 5432 | |
volumeMounts: | |
- mountPath: /var/lib/postgresql/data | |
name: datadir | |
subPath: pgdata | |
terminationGracePeriodSeconds: 60 | |
volumeClaimTemplates: | |
- metadata: | |
name: datadir | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 1Gi | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: postgres | |
namespace: konga | |
spec: | |
ports: | |
- name: pgql | |
port: 5432 | |
protocol: TCP | |
targetPort: 5432 | |
selector: | |
app: postgres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment