rename kube to kubectl and add README.md

This commit is contained in:
2025-07-28 11:34:01 +02:00
committed by swordsteel
parent c91bafd272
commit fe01ad9125
46 changed files with 3 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
apiVersion: v1
kind: Secret
metadata:
name: postgres
namespace: hlaeja
labels:
app: postgres
environment: testing
tier: database
type: Opaque
stringData:
POSTGRES_PASSWORD: "password"

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: postgres
namespace: hlaeja
labels:
app: postgres
environment: testing
tier: database
data:
POSTGRES_USER: "postgres"

View File

@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: postgres
namespace: hlaeja
labels:
app: postgres
environment: testing
tier: database
spec:
serviceName: postgres
replicas: 1
selector:
matchLabels:
app: postgres
template:
metadata:
labels:
app: postgres
spec:
containers:
- name: postgres
image: postgres:17
ports:
- containerPort: 5432
envFrom:
- configMapRef:
name: postgres
- secretRef:
name: postgres
volumeMounts:
- name: postgres-data
mountPath: /var/lib/postgresql/data
volumeClaimTemplates:
- metadata:
name: postgres-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi

View File

@@ -0,0 +1,21 @@
apiVersion: v1
kind: Service
metadata:
name: postgres
namespace: hlaeja
labels:
app: postgres
environment: testing
tier: database
annotations:
metallb.universe.tf/address-pool: default
spec:
type: LoadBalancer
loadBalancerIP: 10.0.3.141
selector:
app: postgres
ports:
- port: 5432
targetPort: 5432
protocol: TCP
name: postgres