Closed hpollak closed 3 years ago
Some information I have forgotten:
hpollak@k8s3:~$ kubectl -n test describe pvc test-pvc
Name: test-pvc
Namespace: test
StorageClass: linstor-test
Status: Bound
Volume: pvc-98b9f72a-eaef-4d5b-b104-f61ded8e3fa0
Labels: <none>
Annotations: pv.kubernetes.io/bind-completed: yes
pv.kubernetes.io/bound-by-controller: yes
volume.beta.kubernetes.io/storage-provisioner: linstor.csi.linbit.com
Finalizers: [kubernetes.io/pvc-protection]
Capacity: 1Gi
Access Modes: RWX
VolumeMode: Filesystem
Used By: nginx-deployment-697fd6c789-zvl6m
Events: <none>
hpollak@k8s3:~$ kubectl describe pv pvc-98b9f72a-eaef-4d5b-b104-f61ded8e3fa0
Name: pvc-98b9f72a-eaef-4d5b-b104-f61ded8e3fa0
Labels: <none>
Annotations: pv.kubernetes.io/provisioned-by: linstor.csi.linbit.com
Finalizers: [kubernetes.io/pv-protection external-attacher/linstor-csi-linbit-com]
StorageClass: linstor-test
Status: Bound
Claim: test/test-pvc
Reclaim Policy: Delete
Access Modes: RWX
VolumeMode: Filesystem
Capacity: 1Gi
Node Affinity: <none>
Message:
Source:
Type: CSI (a Container Storage Interface (CSI) volume source)
Driver: linstor.csi.linbit.com
FSType: ext4
VolumeHandle: pvc-98b9f72a-eaef-4d5b-b104-f61ded8e3fa0
ReadOnly: false
VolumeAttributes: storage.kubernetes.io/csiProvisionerIdentity=1627478454186-8081-linstor.csi.linbit.com
Events: <none>
Started with kube-linstor i had some problems, caused on microk8s didn't assigned node-roles, so i added "node-role.kubernetes.io/master: "" " per hand to the nodes. But then the installation works fine.
Yeah, I should probably remove this from the example values 😅
"touch /mnt1/harry_dont_understand.txt
that's weird, are you sure you used /mnt1, not /mnt? Afterr applying your YAMLs I have everything fine:
$ kubectl exec -ti deploy/nginx-deployment -- df -h /mnt1
Filesystem Size Used Avail Use% Mounted on
/dev/drbd1011 980M 2.6M 910M 1% /mnt1
yes, i used /mnt1 instead of /mnt cause /mnt is a standard-folder and i want do be sure nothing else use it. So maybe I have something done wrong on setup. I will resetup the nodes from scatch. Thank you!! Best regards
I think this is Problem Problem with microk8s so I have opened an issue there.
@hpollak could you link the issue here please?
UPD: Ah, found it already https://github.com/ubuntu/microk8s/issues/2490
Hy!
I'm just started playing with k8s and drbd, so maybe this is only a stupid misstake, but I'm at the end of my knowledge.
I have a 3 node microk8s cluster based on Ubuntu Server 20.04.2 ( microk8s is installed via snap and in the k8s version 1.21.1 ). On this cluster i deployed kube-linstore v1.13.0-1 like it is described in README.md. Started with kube-linstor i had some problems, caused on microk8s didn't assigned node-roles, so i added "node-role.kubernetes.io/master: "" " per hand to the nodes. But then the installation works fine.
My Problem is: I create a simple test deployment but when I stop a node the pod sucks on terminating ( only force termination by hand helps ) and the creation of the new pod on the other node hangs with "multiple mount..." So I search for the reason an it seams like the pod mount a local folder instead of a drbd device. I exec a bash on the pod and "touch /mnt1/harry_dont_understand.txt" after this i mount the drbd-volume and search for this file. The file isn't found on /dev/drbd1002 instead it is found on "/var/snap/microk8s/common/var/lib/kubelet/pods/f6eb8152-7452-42b4-bdd5-20d147bd2982/volumes/kubernetes.io~csi/pvc-98b9f72a-eaef-4d5b-b104-f61ded8e3fa0/mount/harry_dont_understand.txt".
I have no idea how to solve this Problem.
My yaml file for kubectl:
linstore means:
the rest:
I hope someone can help me.
best regards Harry