yaml
apiVersion: v1
kind: Namespace
metadata:
name: meilisearch
---
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: meilisearch
name: meilisearch
labels:
app.kubernetes.io/name: meilisearch
app.kubernetes.io/instance: meilisearch
---
# Source: meilisearch/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
namespace: meilisearch
name: meilisearch-environment
labels:
app.kubernetes.io/name: meilisearch
app.kubernetes.io/instance: meilisearch
data:
MEILI_ENV: "development"
MEILI_NO_ANALYTICS: "true"
MEILI_HTTP_PAYLOAD_SIZE_LIMIT: "10Gb"
MEILI_DB_PATH: "/data"
MEILI_MASTER_KEY: "ellisniubitesthahaha"
---
# Source: meilisearch/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: meilisearch
namespace: meilisearch
spec:
type: NodePort
selector:
app: meilisearch
ports:
- port: 7700
targetPort: 7700
nodePort: 31170
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: meilisearch
name: meilisearch
spec:
selector:
matchLabels:
app: meilisearch
replicas: 1
template:
metadata:
labels:
app: meilisearch
spec:
securityContext:
fsGroup: 1000
containers:
- name: meilisearch
image: getmeili/meilisearch:v1.12.0
imagePullPolicy: IfNotPresent
resources:
requests:
memory: 1Gi
cpu: "1"
limits:
memory: 2Gi
cpu: "2"
envFrom:
- configMapRef:
name: meilisearch-environment
ports:
- name: http
containerPort: 7700
protocol: TCP
livenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 30
readinessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 30
设置了MEILI_MASTER_KEY后,需要添加认证才能访问API
https://github.com/meilisearch/meilisearch-kubernetes/blob/main/charts/meilisearch/values.yaml