Skip to content

Add deployment manifests for MicroK8s #34

Open
@sta4152

Description

@sta4152

After installing the driver on a microk8s cluster, the example dyn-app does not start successfully. Due to

Nov 12 11:01:13 node01.cluster microk8s.daemon-kubelite[255976]: E1112 11:01:13.907517  255976 csi_attacher.go:364] kubernetes.io/csi: attacher.MountDevice failed: rpc error: code = Internal desc = stat /var/snap/microk8s/common/var/lib/kubelet/plugins/kubernetes.io/csi/beegfs.csi.netapp.com/546560a6191b66852bcfc73103f6bc91327cf030684f8394f25acab2da84a015/globalmount: no such file or directory

Installed by

kubectl apply -k deploy/k8s/overlays/my-overlay
kubectl apply -f examples/k8s/dyn/dyn-sc.yaml
kubectl apply -f examples/k8s/dyn/dyn-pvc.yaml
kubectl apply -f examples/k8s/dyn/dyn-app.yaml

Best guess: microk8s does not use /var/lib/kubelet as root dir but /var/snap/microk8s/common/var/lib/kubelet, with sym-linking the common default to that dir. The sym-link does not work with the mounting used by the beegfs driver.

Unfortunately I do not see any config option to specify a prefix/alternate location. But this is needed here AFAIS (similar to the kubeletDirPath in ceph - they suffer from the same without having specified this correctly).

The following patching of sources seems to work for me - please correct me if I am wrong with that or if this could cause problems somewhere later!: from within the repo root dir (I used the 1.7 branch) replace the /var/lib/kubelet occurences in non-test yaml files with the micork8s specific path:

sed -i 's%/var/lib/kubelet%/var/snap/microk8s/common/var/lib/kubelet%g' \
    $(find . -name \*.yaml | grep -v '/test/')

I see the /var/lib/kubelethard-coded also in the driver sourcecode. But I guess (and hope) that for that the sym-link does it's job, that the problem is just a matter of mounting host dirs (being and/or including sym-links) into the containers ... ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgauging-interestIssues where we're collecting community input to determine interest in a proposed feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions