# load the image to local
$ docker load -i alluxio-k8s-operator-1.2.0-docker.tar
# retag the image with your private registry
$ docker tag alluxio/k8s-operator:1.2.0 <YOUR.PRIVATE.REGISTRY.HERE>/alluxio-operator:1.2.0
# push to the remote registry
$ docker push <YOUR.PRIVATE.REGISTRY.HERE>/alluxio-operator:1.2.0
为 operator 解压 helm chart
# the command will extract the files to the directory alluxio-operator/
$ tar zxf alluxio-operator-1.2.0-helmchart.tgz
# the last parameter is the directory to the helm chart
$ helm install operator -f alluxio-operator/alluxio-operator.yaml alluxio-operator
NAME: operator
LAST DEPLOYED: Wed May 15 17:32:34 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
# verify if the operator is running as expected
$ kubectl get pod -n alluxio-operator
NAME READY STATUS RESTARTS AGE
alluxio-controller-6b449d8b68-njx7f 1/1 Running 0 45s
operator-alluxio-csi-controller-765f9fd65-drjm4 2/2 Running 0 45s
operator-alluxio-csi-nodeplugin-ks262 2/2 Running 0 45s
operator-alluxio-csi-nodeplugin-vk8r4 2/2 Running 0 45s
ufs-controller-65f7c84cbd-kll8q 1/1 Running 0 45s
部署 Alluxio
$ kubectl create -f alluxio-operator/alluxio-cluster.yaml
alluxiocluster.k8s-operator.alluxio.com/alluxio created
# the cluster will be starting
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
alluxio-etcd-0 0/1 ContainerCreating 0 7s
alluxio-etcd-1 0/1 ContainerCreating 0 7s
alluxio-etcd-2 0/1 ContainerCreating 0 7s
alluxio-master-0 0/1 Init:0/1 0 7s
alluxio-monitor-grafana-847fd46f4b-84wgg 0/1 Running 0 7s
alluxio-monitor-prometheus-778547fd75-rh6r6 1/1 Running 0 7s
alluxio-worker-76c846bfb6-2jkmr 0/1 Init:0/2 0 7s
alluxio-worker-76c846bfb6-nqldm 0/1 Init:0/2 0 7s
# check the status of the cluster
$ kubectl get alluxiocluster
NAME CLUSTERPHASE AGE
alluxio Ready 2m18s
# and check the running pods after the cluster is ready
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
alluxio-etcd-0 1/1 Running 0 2m3s
alluxio-etcd-1 1/1 Running 0 2m3s
alluxio-etcd-2 1/1 Running 0 2m3s
alluxio-master-0 1/1 Running 0 2m3s
alluxio-monitor-grafana-7b9477d66-mmcc5 1/1 Running 0 2m3s
alluxio-monitor-prometheus-78dbb89994-xxr4c 1/1 Running 0 2m3s
alluxio-worker-85fd45db46-c7n9p 1/1 Running 0 2m3s
alluxio-worker-85fd45db46-sqv2c 1/1 Running 0 2m3s
$ kubectl create -f alluxio-operator/ufs.yaml
underfilesystem.k8s-operator.alluxio.com/alluxio-s3 created
# verify the status of the storage
$ kubectl get ufs
NAME PHASE AGE
alluxio-s3 Ready 46s
# also check the mount table via Alluxio command line
$ kubectl exec -it alluxio-master-0 -- alluxio mount list 2>/dev/null
Listing all mount points
s3://my-bucket/path/to/mount on /s3/ properties={s3a.secretKey=xxx, alluxio.underfs.s3.region=us-east-1, s3a.accessKeyId=xxx}