Развертывание Scheduler
Обновлено: 05.03.2024
Scheduler — внутренний-сервис.
Деплоймент:
apiVersion: apps/v1
kind: Deployment
metadata:
name: scheduler-deployment
namespace: testing
labels:
appName: scheduler-deployment
spec:
selector:
matchLabels:
appName: scheduler-app
template:
metadata:
labels:
appName: scheduler-app
spec:
containers:
- name: scheduler
image: cr.yandex/crpr8bvek949tq2fuqkf/scheduler:latest
ports:
- protocol: TCP
containerPort: 5405
env:
- name: "ASPNETCORE_URLS"
value: "http://*:5405"
volumeMounts:
- mountPath: /app/secrets
name: app-settings
readOnly: true
volumes:
- name: app-settings
projected:
sources:
- secret:
name: app-settings
- secret:
name: kafka-cert
imagePullSecrets:
- name: service-settings
Опционально можно развернуть панель мониторинга:
---
apiVersion: v1
kind: Service
metadata:
name: scheduler-service
namespace: timetta
spec:
selector:
appName: scheduler-app
ports:
- protocol: TCP
port: 80
targetPort: 5405
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: scheduler-ingress
namespace: onprem
annotations:
cert-manager.io/cluster-issuer: "letsencrypt"
nginx.ingress.kubernetes.io/proxy-buffer-size: "64k"
nginx.ingress.kubernetes.io/proxy-buffers-number: "8"
spec:
ingressClassName: "nginx"
tls:
- hosts:
- scheduler.tools.timetta-on-prem.com
secretName: admin-scheduler-test-tls
rules:
- host: scheduler.your-domain
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: scheduler-service
port:
number: 80