Added configs

This commit is contained in:
gabenov.s
2025-10-27 21:21:00 +03:00
parent 04add9903c
commit 82744a8abb
3 changed files with 60 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: backend
spec:
replicas: 1
selector:
matchLabels:
app: backend
template:
metadata:
labels:
app: backend
spec:
containers:
- name: http-echo
image: hashicorp/http-echo:0.2.3
args:
- "-listen=:8080"
- "-text=Hello from the Backend!"
ports:
- containerPort: 8080

View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: backend-service
spec:
type: ClusterIP # Default
selector:
app: backend
ports:
- port: 80 # Service port (used by internal clients)
targetPort: 8080 # Container port in the backend Pod

View File

@@ -0,0 +1,27 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
spec:
replicas: 1
selector:
matchLabels:
app: frontend
template:
metadata:
labels:
app: frontend
spec:
containers:
- name: curl-loop
image: curlimages/curl:7.86.0
command: ["/bin/sh"]
args:
- "-c"
- |
while true; do
echo "=== Calling backend-service:80 ==="
curl -s backend-service:80
echo
sleep 5
done