From a23afa721c3e39322db355d5aabc7787ffcec4b8 Mon Sep 17 00:00:00 2001 From: zomborip Date: Wed, 26 Nov 2025 18:04:01 +0100 Subject: [PATCH] kubi files --- k8s/mariadb-deployment.yaml | 30 ++++++++++++++++++++++++++++++ k8s/mariadb-service.yaml | 13 +++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 k8s/mariadb-deployment.yaml create mode 100644 k8s/mariadb-service.yaml diff --git a/k8s/mariadb-deployment.yaml b/k8s/mariadb-deployment.yaml new file mode 100644 index 0000000..1748ec7 --- /dev/null +++ b/k8s/mariadb-deployment.yaml @@ -0,0 +1,30 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: telefonkonyv-db + namespace: szakdolgozat +spec: + replicas: 1 + selector: + matchLabels: + app: telefonkonyv-db + template: + metadata: + labels: + app: telefonkonyv-db + spec: + containers: + - name: mariadb + image: mariadb:11 + imagePullPolicy: IfNotPresent + ports: + - containerPort: 3306 + env: + - name: MARIADB_ROOT_PASSWORD + value: "rootpw" + - name: MARIADB_DATABASE + value: "telefonkonyv" + - name: MARIADB_USER + value: "appuser" + - name: MARIADB_PASSWORD + value: "apppass" diff --git a/k8s/mariadb-service.yaml b/k8s/mariadb-service.yaml new file mode 100644 index 0000000..16c3a03 --- /dev/null +++ b/k8s/mariadb-service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: telefonkonyv-db + namespace: szakdolgozat +spec: + type: NodePort + selector: + app: telefonkonyv-db + ports: + - port: 3306 + targetPort: 3306 + nodePort: 31306