k8s 中部署meilisearch

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

相关推荐
summer_west_fish17 小时前
Istio 补充 Kubernetes 的不足
kubernetes
admin_23321 小时前
k8s集群,CRI-Docker部署条件及方法
docker·容器·kubernetes
admin_23321 小时前
k8s修改存储目录-介绍
云原生·容器·kubernetes
what_201821 小时前
Docker和K8s关系
docker·容器·kubernetes
裁二尺秋风21 小时前
k8s基础(4)—Kubernetes-Service
云原生·容器·kubernetes
古人诚不我欺21 小时前
K8s高可用集群之Kubernetes集群管理平台、命令补全工具、资源监控工具部署、常用命令
云原生·容器·kubernetes
C182981825751 天前
Kubernetes
云原生·容器·kubernetes
predisw2 天前
请求是如何通过k8s service 路由到对应的pod
云原生·容器·kubernetes·cloud native
霍格沃兹测试开发学社测试人社区3 天前
Docker隔离及资源限制原理
软件测试·测试开发·docker·容器·eureka·kubernetes
开源架构师3 天前
开源架构的容器化部署优化版
ci/cd·docker·kubernetes·开源·容器安全·开源架构·容器化部署