k3s
This commit is contained in:
parent
17ad2c9ce8
commit
be49f4bb8a
0
k3s_config/Grafana/ingress.yaml
Normal file
0
k3s_config/Grafana/ingress.yaml
Normal file
41
k3s_config/Localai/localai-deploy.yaml
Normal file
41
k3s_config/Localai/localai-deploy.yaml
Normal file
@ -0,0 +1,41 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: localai
|
||||
labels:
|
||||
app: localai
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: localai
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: localai
|
||||
spec:
|
||||
containers:
|
||||
- name: localai
|
||||
image: quay.io/go-skynet/local-ai:v2.22.1-ffmpeg
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
volumeMounts:
|
||||
- mountPath: /models
|
||||
name: model-volume
|
||||
volumes:
|
||||
- name: model-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: localai-pvc
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: localai-service
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
selector:
|
||||
app: localai
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
18
k3s_config/Localai/localai-ingres.yaml
Normal file
18
k3s_config/Localai/localai-ingres.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: localai-ingress
|
||||
annotations:
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: web
|
||||
spec:
|
||||
rules:
|
||||
- host: localai.local
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: localai-service
|
||||
port:
|
||||
number: 80
|
||||
11
k3s_config/Localai/localai-pvc.yaml
Normal file
11
k3s_config/Localai/localai-pvc.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: localai-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
storageClassName: longhorn
|
||||
60
k3s_config/Localai/values.yaml
Normal file
60
k3s_config/Localai/values.yaml
Normal file
@ -0,0 +1,60 @@
|
||||
deployment:
|
||||
image:
|
||||
repository: quay.io/go-skynet/local-ai
|
||||
tag: latest-cpu
|
||||
env:
|
||||
threads: 4
|
||||
context_size: 512
|
||||
modelsPath: "/models"
|
||||
prompt_templates:
|
||||
image: busybox
|
||||
pullPolicy: IfNotPresent
|
||||
imagePullSecrets: []
|
||||
|
||||
resources:
|
||||
{}
|
||||
|
||||
modelsConfigs:
|
||||
{}
|
||||
|
||||
promptTemplates:
|
||||
{}
|
||||
|
||||
initContainers: []
|
||||
sidecarContainers: []
|
||||
|
||||
persistence:
|
||||
models:
|
||||
enabled: true
|
||||
storageClass: "longhorn"
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
size: 10Gi
|
||||
globalMount: /models
|
||||
output:
|
||||
enabled: true
|
||||
storageClass: "longhorn"
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
size: 5Gi
|
||||
globalMount: /tmp/generated
|
||||
|
||||
service:
|
||||
type: LoadBalancer
|
||||
port: 80
|
||||
annotations: {}
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
hosts:
|
||||
- host: localai.local
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls: []
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
28
k3s_config/coredns.yaml
Normal file
28
k3s_config/coredns.yaml
Normal file
@ -0,0 +1,28 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: coredns
|
||||
namespace: kube-system
|
||||
data:
|
||||
Corefile: |
|
||||
.:53 {
|
||||
errors
|
||||
health
|
||||
ready
|
||||
kubernetes cluster.local in-addr.arpa ip6.arpa {
|
||||
pods insecure
|
||||
fallthrough in-addr.arpa ip6.arpa
|
||||
}
|
||||
hosts /etc/coredns/NodeHosts {
|
||||
ttl 60
|
||||
reload 15s
|
||||
fallthrough
|
||||
}
|
||||
prometheus :9153
|
||||
forward . 8.8.8.8 1.1.1.1
|
||||
cache 30
|
||||
loop
|
||||
reload
|
||||
loadbalance
|
||||
import /etc/coredns/custom/*.override
|
||||
}
|
||||
51
k3s_config/nextcloud/mariadb-deployment.yaml
Normal file
51
k3s_config/nextcloud/mariadb-deployment.yaml
Normal file
@ -0,0 +1,51 @@
|
||||
# mariadb-deployment.yaml (обновленный)
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mariadb
|
||||
namespace: nextcloud
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mariadb
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mariadb
|
||||
spec:
|
||||
containers:
|
||||
- name: mariadb
|
||||
image: mariadb:10.5
|
||||
env:
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
value: "8148"
|
||||
- name: MYSQL_DATABASE
|
||||
value: nextcloud
|
||||
- name: MYSQL_USER
|
||||
value: nextcloud_user
|
||||
- name: MYSQL_PASSWORD
|
||||
value: "1488"
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
name: mariadb
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/mysql
|
||||
name: mariadb-data
|
||||
volumes:
|
||||
- name: mariadb-data
|
||||
persistentVolumeClaim:
|
||||
claimName: mariadb-pvc
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mariadb-service
|
||||
namespace: nextcloud
|
||||
spec:
|
||||
selector:
|
||||
app: mariadb
|
||||
ports:
|
||||
- port: 3306
|
||||
targetPort: 3306
|
||||
clusterIP: None
|
||||
13
k3s_config/nextcloud/mariadb-pvc.yaml
Normal file
13
k3s_config/nextcloud/mariadb-pvc.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
# mariadb-pvc.yaml
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: mariadb-pvc
|
||||
namespace: nextcloud
|
||||
spec:
|
||||
storageClassName: longhorn
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi # Укажите необходимый размер хранилища
|
||||
36
k3s_config/nextcloud/nextcloud-deployment.yaml
Normal file
36
k3s_config/nextcloud/nextcloud-deployment.yaml
Normal file
@ -0,0 +1,36 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nextcloud
|
||||
namespace: nextcloud
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nextcloud
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nextcloud
|
||||
spec:
|
||||
containers:
|
||||
- name: nextcloud
|
||||
image: nextcloud:stable
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeMounts:
|
||||
- mountPath: /var/www/html
|
||||
name: nextcloud-data
|
||||
env:
|
||||
- name: MYSQL_HOST
|
||||
value: "mariadb-service"
|
||||
- name: MYSQL_DATABASE
|
||||
value: "nextcloud"
|
||||
- name: MYSQL_USER
|
||||
value: "nextcloud_user"
|
||||
- name: MYSQL_PASSWORD
|
||||
value: "1488"
|
||||
volumes:
|
||||
- name: nextcloud-data
|
||||
persistentVolumeClaim:
|
||||
claimName: nextcloud-pvc
|
||||
19
k3s_config/nextcloud/nextcloud-ingress.yaml
Normal file
19
k3s_config/nextcloud/nextcloud-ingress.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: nextcloud-ingress
|
||||
namespace: nextcloud
|
||||
annotations:
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: web
|
||||
spec:
|
||||
rules:
|
||||
- host: nextcloud.intr # Укажите ваш домен
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: nextcloud-service
|
||||
port:
|
||||
number: 80
|
||||
12
k3s_config/nextcloud/nextcloud-pvc.yaml
Normal file
12
k3s_config/nextcloud/nextcloud-pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: nextcloud-pvc
|
||||
namespace: nextcloud
|
||||
spec:
|
||||
storageClassName: longhorn
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
14
k3s_config/nextcloud/nextcloud-service.yaml
Normal file
14
k3s_config/nextcloud/nextcloud-service.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nextcloud-service
|
||||
namespace: nextcloud
|
||||
spec:
|
||||
type: LoadBalancer # Или используйте 'NodePort', если 'LoadBalancer' недоступен
|
||||
selector:
|
||||
app: nextcloud
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 80
|
||||
|
||||
13
k3s_config/traefik/traefik-acme-pvc.yaml
Normal file
13
k3s_config/traefik/traefik-acme-pvc.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
# traefik-acme-pvc.yaml
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: traefik-acme-pvc
|
||||
namespace: kube-system
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: longhorn # Убедитесь, что используете правильный StorageClass
|
||||
resources:
|
||||
requests:
|
||||
storage: 3Gi
|
||||
50
k3s_config/traefik/traefik-values.yaml
Normal file
50
k3s_config/traefik/traefik-values.yaml
Normal file
@ -0,0 +1,50 @@
|
||||
# traefik-values.yaml
|
||||
|
||||
deployment:
|
||||
podAnnotations:
|
||||
prometheus.io/port: "8082"
|
||||
prometheus.io/scrape: "true"
|
||||
|
||||
global:
|
||||
systemDefaultRegistry: ""
|
||||
|
||||
image:
|
||||
repository: rancher/mirrored-library-traefik
|
||||
tag: 2.11.10
|
||||
|
||||
priorityClassName: system-cluster-critical
|
||||
|
||||
providers:
|
||||
kubernetesIngress:
|
||||
publishedService:
|
||||
enabled: true
|
||||
|
||||
service:
|
||||
type: LoadBalancer
|
||||
ipFamilyPolicy: PreferDualStack
|
||||
ports:
|
||||
web:
|
||||
port: 8000
|
||||
exposedPort: 8000
|
||||
websecure:
|
||||
port: 8443
|
||||
exposedPort: 8443
|
||||
|
||||
certificatesResolvers:
|
||||
myresolver:
|
||||
acme:
|
||||
email: gba404@gmail.com # Замените на ваш email
|
||||
storage: /letsencrypt/acme.json
|
||||
httpChallenge:
|
||||
entryPoint: web
|
||||
|
||||
persistence:
|
||||
enabled: true
|
||||
existingClaim: traefik-acme-pvc
|
||||
# Если хотите создать новый PVC через Helm, используйте следующие параметры:
|
||||
accessMode: ReadWriteOnce
|
||||
size: 3Gi
|
||||
storageClass: longhorn
|
||||
|
||||
additionalArguments:
|
||||
- "--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web"
|
||||
Loading…
Reference in New Issue
Block a user