Removed docker swarm config
Added K8S config With big refactor
This commit is contained in:
72
deploy/k8s/api-cache.yml
Normal file
72
deploy/k8s/api-cache.yml
Normal file
@@ -0,0 +1,72 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: api-cache
|
||||
namespace: egommerce
|
||||
labels:
|
||||
app: api-cache
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
app: api-cache
|
||||
ports:
|
||||
- port: 6379
|
||||
nodePort: 31300
|
||||
# ---
|
||||
# apiVersion: v1
|
||||
# kind: Service
|
||||
# metadata:
|
||||
# name: api-cache-metrics
|
||||
# namespace: egommerce
|
||||
# labels:
|
||||
# app: api-cache
|
||||
# spec:
|
||||
# type: NodePort
|
||||
# selector:
|
||||
# app: api-cache
|
||||
# ports:
|
||||
# - port: 9121
|
||||
# nodePort: 31301
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: api-cache
|
||||
namespace: egommerce
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: api-cache
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: api-cache
|
||||
spec:
|
||||
containers:
|
||||
- name: api-cache
|
||||
image: git.ego.freeddns.org/egommerce/api-cache:dev
|
||||
imagePullPolicy: Always
|
||||
command: [
|
||||
"redis-server"
|
||||
]
|
||||
args: [
|
||||
"/etc/redis.conf"
|
||||
]
|
||||
env:
|
||||
- name: APP_NAME
|
||||
value: api-cache
|
||||
- name: REDIS_PASSWORD
|
||||
value: "12345678"
|
||||
resources:
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 512M
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
- name: api-cache-metrics
|
||||
image: oliver006/redis_exporter:latest
|
||||
args:
|
||||
- --redis.addr=redis://api-cache:6379
|
||||
ports:
|
||||
- containerPort: 9121
|
||||
Reference in New Issue
Block a user