cool-state-48214
05/09/2022, 7:35 PMgreat-tailor-21038
05/09/2022, 9:37 PMbland-byte-60612
05/09/2022, 9:52 PMPrepare K3s Nodes for Longhorn ISCSI (CentOS 7)
--------------------------------
yum install -y iscsi-initiator-utils
cat <<EOF > iscsid.te
module iscsid 1.0;
require {
type iscsid_t;
class system module_load;
}
allow iscsid_t self:system module_load;
EOF
checkmodule -M -m -o iscsid.mod iscsid.te
semodule_package -m iscsid.mod -o iscsid.pp
semodule -i iscsid.pp
rm -f iscsid.mod iscsid.te iscsid.pp
(Install Longhorn from Rancher UI)
Install snaphot CRDs
------------------------------------
git clone <https://github.com/kubernetes-csi/external-snapshotter.git>
kubectl kustomize external-snapshotter/client/config/crd | kubectl create -f -
kubectl -n kube-system kustomize external-snapshotter/deploy/kubernetes/snapshot-controller | kubectl create -f -
Enable Longhorn Snapshot Class
--------------------------------------
cat <<EOF>> longhorn-csi-snapshotclass.yaml
apiVersion: <http://snapshot.storage.k8s.io/v1|snapshot.storage.k8s.io/v1>
kind: VolumeSnapshotClass
metadata:
name: longhorn
annotations:
<http://k10.kasten.io/is-snapshot-class|k10.kasten.io/is-snapshot-class>: "true"
driver: <http://driver.longhorn.io|driver.longhorn.io>
deletionPolicy: Delete
EOF
kubectl apply -f longhorn-csi-snapshotclass.yaml --kubeconfig k3sconfig
Install local minio for longhorn
--------------------------------------
kubectl create -f <https://raw.githubusercontent.com/longhorn/longhorn/master/deploy/backupstores/minio-backupstore.yaml>
Go to the Longhorn UI. In the top navigation bar, click Settings. In the Backup section, set Backup Target to
<s3://backupbucket@us-east-1/>
And set Backup Target Credential Secret to:
minio-secret
Testing CSI
---------------------------------------
kubestr csicheck -s longhorn -v longhorn
Install Kasten K10
----------------------------------------
helm repo add kasten <https://charts.kasten.io/>
helm repo update
kubectl create namespace kasten-io
helm install k10 kasten/k10 --namespace=kasten-io
Port Forwarding Kasten UI
---------------------------------------
kubectl --namespace kasten-io port-forward service/gateway --address 172.18.117.110 8080:8000 > /dev/null 2>&1 &
Demo Application (Pacman)
---------------------------------
kubectl create namespace pacman
helm repo add veducate <https://saintdle.github.io/helm-charts/>
helm install pacman veducate/pacman -n pacman
cool-state-48214
05/10/2022, 8:05 AMgreat-tailor-21038
05/10/2022, 9:39 AMcool-state-48214
05/10/2022, 9:53 AMgreat-tailor-21038
05/10/2022, 10:08 AMbland-byte-60612
05/10/2022, 12:28 PM