- changes toward a fully functional k8s cluster. First running version of cluster, addition of services works, additional changes to app required.
This commit is contained in:
238
k8s/dev/redis-minio-services.yaml
Normal file
238
k8s/dev/redis-minio-services.yaml
Normal file
@@ -0,0 +1,238 @@
|
||||
# Redis and MinIO Services for EveAI Dev Environment
|
||||
# File: redis-minio-services.yaml
|
||||
---
|
||||
# Redis Persistent Volume Claim
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: redis-data-pvc
|
||||
namespace: eveai-dev
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: local-storage
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
environment: dev
|
||||
|
||||
---
|
||||
# Redis Deployment
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redis
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: redis
|
||||
environment: dev
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redis
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redis
|
||||
spec:
|
||||
containers:
|
||||
- name: redis
|
||||
image: redis:7.2.5
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
volumeMounts:
|
||||
- name: redis-data
|
||||
mountPath: /data
|
||||
livenessProbe:
|
||||
exec:
|
||||
command:
|
||||
- redis-cli
|
||||
- ping
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- redis-cli
|
||||
- ping
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 3
|
||||
resources:
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
cpu: "100m"
|
||||
limits:
|
||||
memory: "512Mi"
|
||||
cpu: "500m"
|
||||
volumes:
|
||||
- name: redis-data
|
||||
persistentVolumeClaim:
|
||||
claimName: redis-data-pvc
|
||||
restartPolicy: Always
|
||||
|
||||
---
|
||||
# Redis Service
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redis-service
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: redis
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 6379
|
||||
targetPort: 6379
|
||||
nodePort: 30006 # Maps to host port 3006
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: redis
|
||||
|
||||
---
|
||||
# MinIO Persistent Volume Claim
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: minio-data-pvc
|
||||
namespace: eveai-dev
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: local-storage
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
selector:
|
||||
matchLabels:
|
||||
app: minio
|
||||
environment: dev
|
||||
|
||||
---
|
||||
# MinIO Deployment
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: minio
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: minio
|
||||
environment: dev
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: minio
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: minio
|
||||
spec:
|
||||
containers:
|
||||
- name: minio
|
||||
image: minio/minio
|
||||
command:
|
||||
- minio
|
||||
- server
|
||||
- /data
|
||||
- --console-address
|
||||
- ":9001"
|
||||
ports:
|
||||
- containerPort: 9000
|
||||
name: api
|
||||
- containerPort: 9001
|
||||
name: console
|
||||
env:
|
||||
- name: MINIO_ROOT_USER
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: eveai-config
|
||||
key: MINIO_ACCESS_KEY
|
||||
- name: MINIO_ROOT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: eveai-secrets
|
||||
key: MINIO_SECRET_KEY
|
||||
volumeMounts:
|
||||
- name: minio-data
|
||||
mountPath: /data
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /minio/health/live
|
||||
port: 9000
|
||||
initialDelaySeconds: 120
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 10
|
||||
successThreshold: 1
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /minio/health/ready
|
||||
port: 9000
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 10
|
||||
successThreshold: 1
|
||||
failureThreshold: 3
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "200m"
|
||||
limits:
|
||||
memory: "1Gi"
|
||||
cpu: "1000m"
|
||||
volumes:
|
||||
- name: minio-data
|
||||
persistentVolumeClaim:
|
||||
claimName: minio-data-pvc
|
||||
restartPolicy: Always
|
||||
|
||||
---
|
||||
# MinIO Service (API)
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: minio-service
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: minio
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 9000
|
||||
targetPort: 9000
|
||||
nodePort: 30008 # Maps to host port 3008
|
||||
protocol: TCP
|
||||
name: api
|
||||
selector:
|
||||
app: minio
|
||||
|
||||
---
|
||||
# MinIO Console Service
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: minio-console-service
|
||||
namespace: eveai-dev
|
||||
labels:
|
||||
app: minio
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 9001
|
||||
targetPort: 9001
|
||||
nodePort: 30009 # Maps to host port 3009
|
||||
protocol: TCP
|
||||
name: console
|
||||
selector:
|
||||
app: minio
|
||||
Reference in New Issue
Block a user