Skip to main content

Upgrade JuiceFS Client Individually

For versions prior to v0.10.0, the JuiceFS client can be upgraded separately without upgrading the CSI Driver by the following method.

  1. Use this script to replace the juicefs binary in juicefs-csi-node pod with the new built one:

    #!/bin/bash
    KUBECTL=/path/to/kubectl
    JUICEFS_BIN=/path/to/new/juicefs

    $KUBECTL -n kube-system get pods | grep juicefs-csi-node | awk '{print $1}' | \
    xargs -L 1 -P 10 -I'{}' \
    $KUBECTL -n kube-system cp $JUICEFS_BIN '{}':/tmp/juicefs -c juicefs-plugin

    $KUBECTL -n kube-system get pods | grep juicefs-csi-node | awk '{print $1}' | \
    xargs -L 1 -P 10 -I'{}' \
    $KUBECTL -n kube-system exec -i '{}' -c juicefs-plugin -- \
    chmod a+x /tmp/juicefs && mv /tmp/juicefs /bin/juicefs
    note

    Replace /path/to/kubectl and /path/to/new/juicefs in the script with the actual values, then execute the script.

  2. Restart the applications one by one, or kill the existing pods.