Cluster information:
Kubernetes version: 1.24.1
Cloud being used: Azure
Installation method: Helm Chart
Explanation
I am very new to Kubernetes and decided to migrate one little side-project I have hosted here: GitHub - MrDesjardins/realtimepixel
I am trying to expose a frontend service that connects to a backend service that connects to a Redis service. Locally, I have a docker-compose, and it works. Now, moving to Kubernetes, I have some success (everything is green under Azure, but the exposed IP does not return anything. I added an ingress but haven’t seen a difference from only using the frontend service being a LoadBalancer.
Debug yaml output
The Helm Chart is producing the following output. I do not use that output, I use az login and Helm to install everything on Azure (see the action if relevant here realtimepixel/k8sdeploy.yml at master · MrDesjardins/realtimepixel · GitHub)
---
# Source: realtimepixel/templates/service_backend.yaml
apiVersion: v1
kind: Service
metadata:
name: backend-service
namespace: realtimepixel-prod
labels:
app: backend-service
spec:
type: NodePort
ports:
- port: 3500
targetPort: 3500
selector:
app: backend-pod
---
# Source: realtimepixel/templates/service_frontend.yaml
apiVersion: v1
kind: Service
metadata:
name: frontend-service
namespace: realtimepixel-prod
labels:
app: frontend-service
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 3501
selector:
app: frontend-pod
---
# Source: realtimepixel/templates/service_redis.yaml
apiVersion: v1
kind: Service
metadata:
name: redis-service
namespace: realtimepixel-prod
labels:
app: redis-service
spec:
type: NodePort
ports:
- port: 6379
targetPort: 6379
selector:
app: redis-pod
---
# Source: realtimepixel/templates/deployment_backend.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: backend-deployment
namespace: realtimepixel-prod
spec:
replicas: 1
selector:
matchLabels:
app: "backend-pod"
template:
metadata:
labels:
app: "backend-pod"
spec:
serviceAccountName: default
securityContext:
{}
containers:
- name: backend-pod
securityContext:
{}
image: "realtimepixel.azurecr.io/realtimepixel_backend:123123"
imagePullPolicy: Always
ports:
- containerPort: 3500
env:
- name: SERVER_IP
value: "backend-service"
- name: SERVER_PORT
value: "80"
- name: REDIS_IP
value: "redis-service"
- name: REDIS_PORT
value: "6379"
- name: CLIENT_IP
value: "frontend-service"
- name: DOCKER_CLIENT_PORT_FORWARD
value: "80"
# livenessProbe:
# httpGet:
# path: /health
# port: http
# readinessProbe:
# httpGet:
# path: /health
# port: http
resources:
{}
---
# Source: realtimepixel/templates/deployment_frontend.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend-deployment
namespace: realtimepixel-prod
spec:
replicas: 1
selector:
matchLabels:
app: "frontend-pod"
template:
metadata:
labels:
app: "frontend-pod"
spec:
serviceAccountName: default
securityContext:
{}
containers:
- name: frontend-pod
securityContext:
{}
image: "realtimepixel.azurecr.io/realtimepixel_frontend:123123"
imagePullPolicy: Always
ports:
- containerPort: 3501
resources:
{}
---
# Source: realtimepixel/templates/deployment_redis.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-deployment
namespace: realtimepixel-prod
spec:
replicas: 1
selector:
matchLabels:
app: "redis-pod"
template:
metadata:
labels:
app: "redis-pod"
spec:
serviceAccountName: default
securityContext:
{}
containers:
- name: redis-pod
securityContext:
{}
image: "realtimepixel.azurecr.io/realtimepixel_redis:123123"
imagePullPolicy: Always
ports:
- containerPort: 6379
resources:
{}
Can someone guide me on what is my mistake?
Thank you