Kubernetes
如何预热 Juicefs 数据
· ☕ 2 分钟
1. 关于 JuiceFS 的缓存 在主机上,预热的缓存是直接放在主机上的。 在集群中,分为两级缓存: Worker,提供集群级别共享的缓存 Fuse,提供仅当前节点级别的缓存 2. 使用 JuiceFS 客户端预热数据 需要注意的是在 Fuse 层预热,仅对当前节点有效,如果需要预热整个集群,需要在

高频 IO 的 POD 并不适合设置 Limit
· ☕ 2 分钟
1. 现象 基于 Kubernetes 的 Elasticsearch 频繁重启,导致服务几乎不可用。 在导入数据过程中,Pod 的内存使用持续增长 Pod 内存使用接近 Limit 之后,继续导入就会触发 Pod 异常退出,错误日志 ERROR: Elasticsearch exited unexpectedly Pod 内存使用率并不会下降,而是维持在 Limit 附近,不久又异常退出 Elasticsearch Pod 内存限制在 64GB,而 JVM 内

使用 JuiceFS 存储 Elasticsearch 数据
· ☕ 4 分钟
1. 存储方案 三种存储方案: 基于目录隔离公用一个 JuiceFS Elasticsearch 的节点共用一个 JuiceFS,通过子目录挂载不同的 Elasticsearch 节点。 /0/ 对应节点 Node-0 /1/ 对应节点 Node-1 /2/ 对应节点 Node-2 这种方式的好处主要是,易于扩展、配置方便。 基于 JuiceFS 隔离节点数据 Elasticsearch 每个节点都对接一个独立的 JuiceF

Fluid 挂载 S3 为 PVC 以及性能测试
· ☕ 1 分钟
1. 创建 Dataset 1 2 3 4 5 6 7 8 9 10 kubectl apply -f - <<EOF apiVersion: v1 kind: Secret metadata: name: my-s3 type: Opaque stringData: aws.accessKeyId: xxx aws.secretKey: xxx EOF 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 kubectl apply -f - <<EOF apiVersion: data.fluid.io/v1alpha1 kind: Dataset metadata: name: my-s3 spec: mounts: - mountPoint: s3://BUCKET/ name: s3 options: alluxio.underfs.s3.endpoint: ks3-cn-beijing-internal.ksyun.com alluxio.underfs.s3.disable.dns.buckets: "false" encryptOptions: - name: aws.accessKeyId valueFrom: secretKeyRef: name: my-s3 key: aws.accessKeyId - name: aws.secretKey valueFrom: secretKeyRef: name: my-s3 key: aws.secretKey accessModes: - ReadWriteMany EOF 2. 创建 Runtime 1 2 3 4 5 6 7 8 9

Fluid 直接挂载 S3 以及性能测试
· ☕ 3 分钟
1. 打包 Fluid Runtime 镜像 创建 fluid_config_init.py 脚本 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 #!/usr/bin/env python import json rawStr = "" with open("/etc/fluid/config.json", "r") as f: rawStr = f.readlines() rawStr = rawStr[0] script = """ #!/bin/sh set -ex MNT_FROM=$mountPoint MNT_TO=$targetPath trap "umount ${MNT_TO}" SIGTERM mkdir -p ${MNT_TO} mount -t lustre -o relatime,flock ${MNT_FROM} ${MNT_TO} sleep inf """ obj = json.loads(rawStr) with open("mount-lustre.sh", "w") as f: f.write('mountPoint="%s"\n' % obj["mounts"][0]["mountPoint"]) f.write('targetPath="%s"\n' % obj["targetPath"]) f.write(script) 只需调整一下 mount 命令即可。 创建启动脚本 entrypoint.sh 1 2 3