加载中...

Redis-insight配置


一.前言

1.1 介绍

RedisInsight旨在于简化Redis应用程序开发。

1.2 功能介绍

  • 可视化并与Redis数据库交互
    扫描现有密钥,添加新密钥,执行CRUD或批量操作。以漂亮的打印JSON对象格式显示对象,并支持友好的键盘导航。
  • 对Redis模块的内置支持
    查询、可视化和交互式操作图形、流和时间序列数据。使用多行查询编辑器生成查询、浏览结果、优化和快速迭代。支持RedisJSON、RediSearch、RedisGraph、Streams、RedisTimeSeries和RedisGears。
  • Redis的内存分析
    离线分析内存使用情况,通过密钥模式、密钥过期和高级搜索来确定内存问题,而不影响Redis的性能。利用建议减少内存使用。
  • Trace Redis命令
    识别顶键、键模式和命令。按群集所有节点上的客户端IP地址、密钥或命令进行筛选。有效地调试Lua脚本
  • 直观的CLI
    当一个GUI还不够时,我们的命令行界面利用redis cli提供语法高亮显示和自动完成,并使用集成的帮助来提供直观的即时帮助。

二.安装配置

2.1 安装

  1. Deployment
# RedisInsight deployment with name 'redisinsight'
apiVersion: apps/v1
kind: Deployment
metadata:
  name: redisinsight #deployment name
  labels:
    app: redisinsight #deployment label
spec:
  replicas: 1 #a single replica pod
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: redisinsight #which pods is the deployment managing, as defined by the pod template
  template: #pod template
    metadata:
      labels:
        app: redisinsight #label for pod/s
    spec:
      volumes:
        - name: db
          persistentVolumeClaim:
            claimName: redisinsight-pv-claim
      initContainers:
        - name: init
          image: busybox
          command:
            - /bin/sh
            - '-c'
            - |
              chown -R 1001 /db
          resources: {}
          volumeMounts:
            - name: db
              mountPath: /db
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
      containers:
        - name:  redisinsight #Container name (DNS_LABEL, unique)
          image: redislabs/redisinsight:latest #repo/image
          imagePullPolicy: IfNotPresent #Always pull image
          volumeMounts:
          - name: db #Pod volumes to mount into the container's filesystem. Cannot be updated.
            mountPath: /db
          ports:
          - containerPort: 8001 #exposed container port and protocol
            protocol: TCP
  1. pvc
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: redisinsight-pv-claim
  labels:
    app: redisinsight
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
  storageClassName: ceph-storageclass
  1. svc
apiVersion: v1
kind: Service
metadata:
  name: redisinsight-service
spec:
  type: LoadBalancer
  ports:
    - port: 80
      targetPort: 8001
  selector:
    app: redisinsight

2.2 交付k8s

kubectl apply -f .

web页面查看


文章作者: huhuhahei
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 huhuhahei !
评论
  目录