Compare commits
No commits in common. "30f836f04ce05e147a10bc6b6be87788b85f838e" and "8424ede01aa8220c8bdf39f5e9ffa53a225c9f6b" have entirely different histories.
30f836f04c
...
8424ede01a
@ -1,13 +1,5 @@
|
|||||||
## 如何重新创建整个namespace
|
## 如何重新创建整个namespace
|
||||||
|
|
||||||
```
|
|
||||||
./init.sh
|
|
||||||
```
|
|
||||||
```
|
|
||||||
```
|
|
||||||
|
|
||||||
下面都都不用看了, 直接执行上面的语句
|
|
||||||
|
|
||||||
先删了 namespace efk,这样里面资源就都没了,除了pv
|
先删了 namespace efk,这样里面资源就都没了,除了pv
|
||||||
然后 microk8s.kubectl create namespace efk
|
然后 microk8s.kubectl create namespace efk
|
||||||
|
|
||||||
|
@ -33,13 +33,13 @@ spec:
|
|||||||
name: elasticsearch-secret
|
name: elasticsearch-secret
|
||||||
key: elastic_password
|
key: elastic_password
|
||||||
- name: ES_JAVA_OPTS
|
- name: ES_JAVA_OPTS
|
||||||
value: "-Xms2g -Xmx4g" # 设置 JVM 堆大小为 2GB-4GB
|
value: "-Xms2g -Xmx2g" # 设置 JVM 堆大小为 2GB
|
||||||
resources: # 增加资源限制
|
resources: # 增加资源限制
|
||||||
requests:
|
requests:
|
||||||
memory: "4Gi"
|
memory: "2Gi"
|
||||||
cpu: "1"
|
cpu: "1"
|
||||||
limits:
|
limits:
|
||||||
memory: "6Gi"
|
memory: "4Gi"
|
||||||
cpu: "2"
|
cpu: "2"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: data-volume
|
- name: data-volume
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
|
|
||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: chroma-config
|
|
||||||
namespace: n8n
|
|
||||||
data:
|
|
||||||
log_config.yml: |
|
|
||||||
version: 1
|
|
||||||
disable_existing_loggers: False
|
|
||||||
formatters:
|
|
||||||
simple:
|
|
||||||
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
|
||||||
handlers:
|
|
||||||
console:
|
|
||||||
class: logging.StreamHandler
|
|
||||||
level: DEBUG
|
|
||||||
formatter: simple
|
|
||||||
stream: ext://sys.stdout
|
|
||||||
root:
|
|
||||||
level: DEBUG
|
|
||||||
handlers: [console]
|
|
@ -1,27 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: chroma-deployment
|
|
||||||
namespace: n8n
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: chroma
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: chroma
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: chroma
|
|
||||||
image: localhost:32000/chromadb/chroma
|
|
||||||
ports:
|
|
||||||
- containerPort: 8000
|
|
||||||
volumeMounts:
|
|
||||||
- name: chroma-storage
|
|
||||||
mountPath: /home/node/.n8n/
|
|
||||||
volumes:
|
|
||||||
- name: chroma-storage
|
|
||||||
persistentVolumeClaim:
|
|
||||||
claimName: chroma-pvc
|
|
@ -1,18 +0,0 @@
|
|||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: chroma-ingress
|
|
||||||
namespace: n8n
|
|
||||||
spec:
|
|
||||||
ingressClassName: traefik
|
|
||||||
rules:
|
|
||||||
- host: chroma.k8s.xunlang.home
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- backend:
|
|
||||||
service:
|
|
||||||
name: chroma-service
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
path: /
|
|
||||||
pathType: Prefix
|
|
@ -1,15 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolume
|
|
||||||
metadata:
|
|
||||||
name: chroma-pv
|
|
||||||
namespace: n8n
|
|
||||||
spec:
|
|
||||||
capacity:
|
|
||||||
storage: 10Gi
|
|
||||||
volumeMode: Filesystem
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
persistentVolumeReclaimPolicy: Retain
|
|
||||||
storageClassName: microk8s-hostpath
|
|
||||||
hostPath:
|
|
||||||
path: /var/snap/microk8s/common/mnt/data/chroma
|
|
@ -1,12 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: chroma-pvc
|
|
||||||
namespace: n8n
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 10Gi
|
|
||||||
storageClassName: microk8s-hostpath
|
|
@ -1,13 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: chroma-service
|
|
||||||
namespace: n8n
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app: chroma
|
|
||||||
ports:
|
|
||||||
- protocol: TCP
|
|
||||||
port: 80
|
|
||||||
targetPort: 8000
|
|
||||||
type: ClusterIP
|
|
@ -1,17 +0,0 @@
|
|||||||
# 创建命名空间(如果不存在)
|
|
||||||
microk8s.kubectl create namespace n8n
|
|
||||||
|
|
||||||
# 创建 PV
|
|
||||||
microk8s.kubectl apply -f chroma-pv.yaml
|
|
||||||
|
|
||||||
# 创建 PVC
|
|
||||||
microk8s.kubectl apply -f chroma-pvc.yaml
|
|
||||||
|
|
||||||
# 创建 Deployment
|
|
||||||
microk8s.kubectl apply -f chroma-deployment.yaml
|
|
||||||
|
|
||||||
# 创建 Service
|
|
||||||
microk8s.kubectl apply -f chroma-service.yaml
|
|
||||||
|
|
||||||
# 创建 Ingress
|
|
||||||
microk8s.kubectl apply -f chroma-ingress.yaml
|
|
Loading…
x
Reference in New Issue
Block a user