diff --git a/z2/deployment.yaml b/z2/deployment.yaml index e8f0523..86e8758 100644 --- a/z2/deployment.yaml +++ b/z2/deployment.yaml @@ -50,3 +50,31 @@ spec: - name: DB_PASSWORD value: "admin" +--- +# ───────────────────────────────────────────────────────────────────────────── +# Deployment – React/Nginx Frontend (2 replicas) +# ───────────────────────────────────────────────────────────────────────────── +apiVersion: apps/v1 +kind: Deployment +metadata: + name: vigimeteo-frontend + namespace: vigimeteo + labels: + app: vigimeteo-frontend +spec: + replicas: 2 + selector: + matchLabels: + app: vigimeteo-frontend + template: + metadata: + labels: + app: vigimeteo-frontend + spec: + containers: + - name: vigimeteo-frontend + image: vigimeteo-frontend:latest + imagePullPolicy: IfNotPresent + ports: + - containerPort: 80 + name: http diff --git a/z2/service.yaml b/z2/service.yaml index b05f0b3..7d84860 100644 --- a/z2/service.yaml +++ b/z2/service.yaml @@ -1,54 +1,5 @@ # ───────────────────────────────────────────────────────────────────────────── -# Deployment – React/Nginx Frontend (2 replicas) -# ───────────────────────────────────────────────────────────────────────────── -apiVersion: apps/v1 -kind: Deployment -metadata: - name: vigimeteo-frontend - namespace: vigimeteo - labels: - app: vigimeteo-frontend -spec: - replicas: 2 - selector: - matchLabels: - app: vigimeteo-frontend - template: - metadata: - labels: - app: vigimeteo-frontend - spec: - containers: - - name: vigimeteo-frontend - image: vigimeteo-frontend:latest - imagePullPolicy: IfNotPresent - ports: - - containerPort: 80 - name: http - ### part bellow recommanded by ia for health check - readinessProbe: - httpGet: - path: / - port: 80 - initialDelaySeconds: 5 - periodSeconds: 10 - livenessProbe: - httpGet: - path: / - port: 80 - initialDelaySeconds: 10 - periodSeconds: 15 - resources: - requests: - cpu: "50m" - memory: "64Mi" - limits: - cpu: "200m" - memory: "128Mi" - ---- -# ───────────────────────────────────────────────────────────────────────────── -# Service – Backend ClusterIP (internal access only) +# Service – Backend NodePort (accessible via localhost:30888) # ───────────────────────────────────────────────────────────────────────────── apiVersion: v1 kind: Service @@ -70,7 +21,7 @@ spec: --- # ───────────────────────────────────────────────────────────────────────────── -# Service – Frontend NodePort (external access via :30500) +# Service – Frontend NodePort (accessible via localhost:30500) # ───────────────────────────────────────────────────────────────────────────── apiVersion: v1 kind: Service