集群管理
1. 生产部署配置
标记节点
kubectl label nodes <coordinator-node> alluxio-role=coordinator
kubectl label nodes <worker-node-1> alluxio-role=worker
kubectl label nodes <worker-node-2> alluxio-role=worker
kubectl label nodes <worker-node-3> alluxio-role=worker
kubectl label nodes <etcd-node-1> alluxio-role=etcd
kubectl label nodes <etcd-node-2> alluxio-role=etcd
kubectl label nodes <etcd-node-3> alluxio-role=etcd生产 alluxio-cluster.yaml
alluxio-cluster.yamlapiVersion: k8s-operator.alluxio.com/v1
kind: AlluxioCluster
metadata:
name: alluxio-cluster
namespace: alx-ns
spec:
image: <PRIVATE_REGISTRY>/alluxio-enterprise
imageTag: AI-3.9-16.0.0
properties:
alluxio.license: <YOUR_CLUSTER_LICENSE>
coordinator:
nodeSelector:
alluxio-role: coordinator
metastore:
type: persistentVolumeClaim
storageClass: "gp2"
size: 4Gi
resources:
# 与 Worker 一样,将 requests 设为与 limits 相同,进入 Guaranteed QoS 级别。
limits:
cpu: "8"
memory: "16Gi"
requests:
cpu: "8"
memory: "16Gi"
jvmOptions:
- "-Xmx8g"
- "-Xms8g"
worker:
nodeSelector:
alluxio-role: worker
count: 3
pagestore:
size: 1000Gi
reservedSize: 100Gi
resources:
# 将 requests 与 limits 设为相同的值,使 Worker 进入 Guaranteed QoS 级别,
# 在节点资源紧张时被驱逐的优先级最低。
limits:
cpu: "8"
memory: "24Gi"
requests:
cpu: "8"
memory: "24Gi"
jvmOptions:
- "-Xmx12g"
- "-Xms12g"
- "-XX:MaxDirectMemorySize=12g"
etcd:
replicaCount: 3
nodeSelector:
alluxio-role: etcd在共享节点上运行多个集群
2. 集群生命周期和配置
扩展集群
扩容(增加 Worker)
情况
命令
效果
缩容(减少 Worker)
升级 Alluxio
步骤 1:升级 Operator
步骤 2:升级 Alluxio 集群
动态更新配置
3. 多租户和联邦
核心概念
身份验证
授权
多租户和隔离
集群联邦
示例工作流:更新缓存策略
Last updated