initial commit

This commit is contained in:
Isaac
2026-04-13 14:20:53 +03:00
commit 0abb1b5550
4 changed files with 339 additions and 0 deletions
+61
View File
@@ -0,0 +1,61 @@
apiVersion: v1
kind: Namespace
metadata:
name: mywebapp
---
apiVersion: v1
kind: ConfigMap
metadata:
name: mywebapp-config
namespace: mywebapp
data:
APP_ENV: "production"
LOG_LEVEL: "info"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mywebapp
namespace: mywebapp
spec:
replicas: 2
selector:
matchLabels:
app: mywebapp
template:
metadata:
labels:
app: mywebapp
spec:
containers:
- name: mywebapp
image: 10.10.131.45:30500/mywebapp:latest
imagePullPolicy: Always
ports:
- containerPort: 80
env:
- name: APP_ENV
valueFrom:
configMapKeyRef:
name: mywebapp-config
key: APP_ENV
- name: LOG_LEVEL
valueFrom:
configMapKeyRef:
name: mywebapp-config
key: LOG_LEVEL
---
apiVersion: v1
kind: Service
metadata:
name: mywebapp-service
namespace: mywebapp
spec:
selector:
app: mywebapp
ports:
- protocol: TCP
port: 80
targetPort: 80
type: NodePort