For the complete documentation index, see llms.txt. This page is also available as Markdown.

etcd Management

Alluxio keeps its durable cluster state in etcd: the mount table, configuration entities, the deployment license, and — when versioning is on — the hash ring member lists. Cached data is not in etcd; it lives on worker disk, which is why etcd work can usually be done without going cold.

On Kubernetes the Operator provisions etcd for you. This page covers what to do after that: pointing at an etcd you run yourself, tuning the bundled one, recovering a single stuck member, moving to a different etcd, and rebuilding when one is beyond repair.

For sizing and quorum rules before you install, see Prerequisites. For etcd across availability zones, see Multiple AZ.

Using an External etcd

To run against an etcd cluster you manage rather than the one the Operator deploys:

apiVersion: k8s-operator.alluxio.com/v1
kind: AlluxioCluster
spec:
  etcd:
    enabled: false
  properties:
    alluxio.etcd.endpoints: http://external-etcd:2379
    # If using TLS for ETCD, add the following:
    # alluxio.etcd.tls.enabled: "true"

On a cluster that is already running and holding state, do not just apply this — the new etcd starts empty and the mount table does not follow. Use Migrating to a Different etcd instead.

For securing the connection, see TLS.

Customizing the Bundled etcd

The fields under spec.etcd follow the Bitnami etcd Helm chart. For example, to pin etcd pods to particular zones with node affinity:

Recovering a Single etcd Member

Use this when the cluster is otherwise healthy — quorum holds, so Alluxio keeps working — but one etcd pod will not come back on its own. It is far less invasive than migrating or rebuilding: no data is touched, and the mount table survives.

etcd's PVCs are ordinarily node-pinned local volumes, so a stuck member is almost always a scheduling problem, not corruption — the pod cannot follow its data to a different node. Two situations produce the identical symptom (pod stuck, not Ready) with very different fixes.

Diagnose

Find the node the member's volume is pinned to, and check whether it is cordoned:

SchedulingDisabled means the node is cordoned. Cordoning only blocks new scheduling — it does not evict the pod already there, and it does not let the StatefulSet reschedule this member anywhere else, because its data only exists on node-7.

If the node is cordoned but otherwise healthy

The pod schedules back onto its own node and rejoins with its existing data. Nothing else to do.

If the node is gone for good

Quorum survives losing one of three members — do not lose a second one while doing this.

Preventing repeat quorum loss

The bundled chart spreads replicas across nodes by default — a soft preference, not a guarantee — and it is easy to lose without noticing: setting spec.etcd.affinity at all, as in the zone-pinning example above, replaces the entire affinity block and silently drops that default. Two etcd pods sharing a node means one node failure loses quorum outright.

Check current placement:

If you set spec.etcd.affinity yourself, make sure it still spreads replicas:

Migrating to a Different etcd

Copy the durable keys to the new etcd, repoint the cluster, restart. The cache stays hot throughout — it is on worker disk, not in etcd.

Use this when moving from the bundled etcd to a managed one, or replacing an etcd cluster. If the old etcd is already unrecoverable, this procedure does not apply; see Rebuilding etcd.

What gets copied

Only three things are durable and have to move:

Key
Holds

/alluxio/CONF/<cluster>/

Mount table and all configuration entities

/LE/license/<cluster>

Deployment license

/LE/version/<cluster>

License version

Everything else rebuilds itself. Worker registrations under /ServiceDiscovery/ and the license instance records under /LE/instances/ and /LE/status/ are held on etcd leases, so they expire and are re-created when the processes restart.

The exception is the hash ring member lists, which do not self-heal — but only if you turned ring versioning on. See If ring versioning is enabled.

If either etcd uses TLS

A managed etcd usually does, and the commands below assume plaintext. Give etcdctl the certificates for whichever end needs them — both, if the source is also TLS — on every invocation:

Keeping that readable is worth an alias:

Alluxio needs the same trust material in Step 6, alongside alluxio.etcd.endpoints:

The endpoint becomes https://, and Alluxio requires the client key in PKCS#8 — a format etcdctl does not care about, so the same key file will not serve both. See TLS for the conversion and for alluxio.etcd.username / alluxio.etcd.password if the target also uses password auth.

Prerequisites

Run the etcdctl commands from any host or pod that has etcdctl and can reach both endpoints. They use the v3 API, which is the default from etcdctl v3.4 on; on anything older, export ETCDCTL_API=3 first. The alluxio and kubectl commands run against the Alluxio pods.

Set these once. Substitute your own namespace, cluster name, and endpoints:

Confirm CL rather than assuming it:

The value must equal $CL. If it does not, every key path below is wrong.

Check that etcdctl reaches both ends before going further:

Step 1: Record a baseline

Both outputs must be unchanged after the cutover.

Save both outputs. Step 7 compares against them.

Step 2: Check the target etcd

The target may already hold unrelated keys — that is fine, Alluxio only reads and writes under its own prefixes. What must not exist is state for this cluster.name.

A non-zero count means a previous or aborted install already used this etcd with this cluster.name. Clear those prefixes, or choose a different cluster.name, before copying — otherwise you layer onto stale state.

Step 3: Copy the durable keys

One copied: line per key. A key that prints nothing did not transfer — Step 4 catches it.

Step 4: Verify the copy

Every line must say MATCH.

A MISMATCH means that key did not survive the round-trip. Re-copy it before going on. Do not continue with any line reading MISMATCH.

Step 5: Dump the source for rollback

Keep this. It is what Rollback falls back to if the old etcd volumes are gone.

Step 6: Repoint and restart

In the AlluxioCluster CR, set etcd.enabled: false and add alluxio.etcd.endpoints. Do not change metadata.name, the mount, or alluxio.cluster.name — the cluster name is what every copied key is prefixed with.

FUSE pods must roll too. DaemonSet FUSE pods restart with the cluster; CSI-provisioned ones do not, so restart them and then the application pods that mount them.

On Docker or bare metal there is no CR: set alluxio.etcd.endpoints in alluxio-site.properties on every node, then restart the coordinator, the workers, and the FUSE processes.

Step 7: Verify

Then confirm the cache survived. Read the two counters off a worker, re-read a dataset that was cached before the migration, and read them again — see Monitoring for the endpoints:

If ring versioning is enabled

Ring member lists do not rebuild themselves, so they need copying too. This only applies when alluxio.user.consistent.hash.ring.versioning.enabled is true; it defaults to false, in which case skip this.

See Hash Ring and Worker Lifecycle for what these lists do.

Rollback

If the old etcd PVCs still exist — the normal case, since Step 6 keeps them — revert the CR (etcd.enabled: true, drop the alluxio.etcd.endpoints line) and apply. The Operator re-adopts the old PVCs by name.

If they are already deleted, stand up an empty etcd and replay the durable keys from the Step 5 dump into it, then point the CR at that:

Cleanup

Only after Step 7 passes. Deleting these volumes is the point of no return for the simple rollback above.

Rebuilding etcd

Alluxio tolerates an etcd outage for a grace period (typically 24 hours) without disrupting I/O, so an etcd pod that restarts cleanly needs no action. If only one member is stuck while the rest of the cluster is healthy, see Recovering a Single etcd Member instead — it is much less work. Rebuild only when the cluster is unrecoverable and its data cannot be copied out — otherwise migrate, which keeps your state.

  1. Shut down the Alluxio cluster: kubectl delete -f alluxio-cluster.yaml

  2. Delete the etcd PVCs: kubectl -n alx-ns delete pvc -l app.kubernetes.io/component=etcd

  3. Check the storage class the PVCs used (kubectl -n alx-ns get pvc -l app.kubernetes.io/component=etcd -o jsonpath='{.items[*].spec.storageClassName}' — run this before step 2 if you have not deleted the PVCs yet). If it provisions dynamically, deleting the PVC already reclaimed the volume — skip to step 4. If it is a statically-provisioned local PV, log into each Kubernetes node that hosted an etcd pod and delete the contents of the host path directory used by the etcd PV.

  4. Recreate the cluster: kubectl create -f alluxio-cluster.yaml. The Operator provisions a new, empty etcd cluster.

  5. Re-mount your UFS paths. If you manage mounts with the UnderFileSystem CRD they are restored for you; otherwise re-add them with alluxio mount add --path <path> --ufs-uri <uri>.

A three-replica etcd cluster only survives a node loss if the replicas are on distinct nodes — see Preventing repeat quorum loss.

Last updated