Install
csi-s3-archiver on MicroK8s
Kubelet's root directory lives under the snap tree. One kubeletDir value moves everything that depends on it.
One value, four places#
MicroK8s runs kubelet with its root directory inside the snap's data tree rather than at
/var/lib/kubelet. A CSI node plugin has to agree with kubelet about that path in four places,
and the chart derives all four from one value:
| What | On MicroK8s |
|---|---|
| The plugin socket and driver state | <root>/plugins/s3archiver.csi.trion.de |
| Where kubelet asks plugins to register | <root>/plugins_registry |
| The volume directories themselves | <root>/pods |
--kubelet-registration-path on the registrar sidecar | the socket path as kubelet sees it |
where <root> is /var/snap/microk8s/common/var/lib/kubelet.
# Helm: one value moves all three host paths and the registrar's argument together.
$ helm install csi-s3-archiver deploy/helm/csi-s3-archiver \
-n csi-s3-archiver --create-namespace \
--set kubeletDir=/var/snap/microk8s/common/var/lib/kubelet
# kustomize: the base has the default path in four places, so rewrite the rendered output.
$ kubectl kustomize deploy/base \
| sed 's#/var/lib/kubelet#/var/snap/microk8s/common/var/lib/kubelet#g' \
| microk8s kubectl apply -f -
# Check that kubelet agrees the driver is there.
$ microk8s kubectl get csinode \
-o jsonpath='{.items[*].spec.drivers[*].name}'
s3archiver.csi.trion.deIf it registers but no pod can use a volume#
The registrar sidecar's --kubelet-registration-path is the one path that is not a mount. It
is a string the driver hands to kubelet, saying where the socket lives on the host. Get the
mounts right and that argument wrong and the driver appears in kubectl get csinode while
every publish fails, because kubelet is dialling a socket that is not there.
Other distributions#
The install page has the overview. The rest of the awkward ones:
- vcluster. Install once on the host cluster. Volumes work from inside untouched, but every prefix placeholder resolves to the synced pod's host identity.
- Talos Linux. The kustomize base already labels its namespace; Helm does not. No kubelet extra mounts are needed.
- OpenShift. hostmount-anyuid rather than privileged. The driver mounts host directories and runs as root, but it is not a privileged container.
- k0s. Point the driver at the k0s path, or point k0s back at the standard one and never think about it again.
- GKE Autopilot and EKS Fargate. Both rule the driver out by design. What to do instead, and why a mixed cluster is still fine.