From a49d4806060f8b535c23b65168106b4ad85d84d7 Mon Sep 17 00:00:00 2001 From: Elton Cheng Date: Mon, 24 Mar 2025 17:05:17 -0400 Subject: [PATCH] Troubleshooting WebApp - Missing credentials for Google Container Registry - Missing Secret Resource - Missing storageClass resource - WebApp targeted port 5432 for the postgres service but the exposed port was 5432 --- manifest.yaml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/manifest.yaml b/manifest.yaml index 5644c33..7da982f 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -7,7 +7,7 @@ metadata: spec: ports: - name: postgres - port: 5434 + port: 5432 protocol: TCP targetPort: 5432 selector: @@ -112,8 +112,8 @@ spec: spec: containers: - name: webapp - image: gcr.io/on-prem-test-314219/interview-project/webapp:latest - imagePullPolicy: Always + image: webapp:local + imagePullPolicy: Never ports: - containerPort: 5000 env: @@ -122,4 +122,18 @@ spec: secretKeyRef: key: postgres name: postgres-passwords - +--- +apiVersion: v1 +kind: Secret +metadata: + name: postgres-passwords +type: Opaque +data: + postgres: c2VjcmV0cGFzc3dvcmQ= +--- +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: gold +provisioner: k8s.io/minikube-hostpath +volumeBindingMode: Immediate \ No newline at end of file