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

相关推荐
黑黍10 小时前
如何在k8s中配置并使用nvidia显卡
云原生·容器·kubernetes
Cxzzzzzzzzzz13 小时前
Kubernetes 架构
容器·架构·kubernetes
梁正雄17 小时前
4、prometheus-服务发现k8s api-2
kubernetes·服务发现·prometheus
人生苦短12818 小时前
Kubernetes(k8s)
云原生·容器·kubernetes
岚天start1 天前
KubeSphere在线安装单节点K8S集群
docker·容器·kubernetes·k8s·kubesphere·kubekey
Yyyy4821 天前
标签Labels、Scheduler:调度器、k8s污点与容忍度
开发语言·kubernetes
xyhshen1 天前
记录一次K8S跨命名空间访问 xxx.xxx.svc.cluster.local 类似内部服务不通的问题
云原生·容器·kubernetes
栗子~~1 天前
shell-基于k8s/docker管理容器、监控模型训练所消耗的最大CPU与最大内存脚本
docker·容器·kubernetes
海鸥811 天前
在k8s中部署seaweedfs,上传文件到seaweedfs方法
云原生·容器·kubernetes
半梦半醒*1 天前
k8s——pod详解2
linux·运维·docker·容器·kubernetes·负载均衡