Skip to content

Instantly share code, notes, and snippets.

View pupapaik's full-sized avatar

Jakub Pavlik pupapaik

View GitHub Profile
cat <<EOF | kubectl create -f -
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: mayastor
parameters:
repl: '3'
protocol: 'iscsi'
provisioner: io.openebs.csi-mayastor
EOF
kubectl -n mayastor describe msp pool-on-node-1
Name: pool-on-node-1
Namespace: mayastor
Labels: <none>
API Version: openebs.io/v1alpha1
Kind: MayastorPool
Metadata:
Creation Timestamp: 2020-08-19T08:18:52Z
Generation: 1
Resource Version: 45513
cat <<EOF | kubectl create -f -
apiVersion: openebs.io/v1alpha1
kind: MayastorPool
metadata:
name: pool-on-node-1
namespace: mayastor
spec:
disks:
- /dev/sdc
node: aks-agentpool-13651304-1
kubectl create -f nats-deployment.yaml
kubectl create -f csi-daemonset.yaml
kubectl create -f mayastorpoolcrd.yaml
kubectl create -f moac-rbac.yaml
kubectl create -f moac-deployment.yaml
kubectl create -f mayastor-daemonset.yaml
kubectl get po -n mayastor
NAME READY STATUS RESTARTS AGE
hugepages-ensure-5dr26 1/1 Running 0 47h
kubectl label node aks-agentpool-13651304-0 openebs.io/engine=mayastor
node/aks-agentpool-13651304-0 labeled
kubectl label node aks-agentpool-13651304-1 openebs.io/engine=mayastor
node/aks-agentpool-13651304-1 labeled
kubectl label node aks-agentpool-13651304-2 openebs.io/engine=mayastor
node/aks-agentpool-13651304-2 labeled
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: hugepages-ensure
namespace: mayastor
labels:
app: hugepages-ensure
spec:
selector:
matchLabels:
# kubectl create -f https://raw.githubusercontent.com/longhorn/longhorn/master/examples/storageclass.yaml
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: longhorn
provisioner: driver.longhorn.io
allowVolumeExpansion: true
parameters:
numberOfReplicas: "3"
$ kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/master/deploy/longhorn.yaml
$ kubectl -n longhorn-system get po
NAME READY STATUS RESTARTS AGE
csi-attacher-7965bb8b59-c4g2c 1/1 Running 0 116s
csi-attacher-7965bb8b59-jqk9t 1/1 Running 0 116s
csi-attacher-7965bb8b59-qrxl6 1/1 Running 0 116s
csi-provisioner-5896666d9b-9lss2 1/1 Running 0 115s
csi-provisioner-5896666d9b-v7wwd 1/1 Running 0 115s
csi-provisioner-5896666d9b-vsq6v 1/1 Running 0 115s
if [[ $# != 1 ]]; then
echo "Usage ./sd_util <physical_intf_name>"
exit
fi
intf_name=$1
if [[ ! -d /sys/class/net/$intf_name ]]; then
echo "Interface not found, script should be run with argo stopped"
exit
ceph status
cluster:
id: bee70a10-dce1-4725-9285-b9ec5d0c3a5e
health: HEALTH_OK
services:
mon: 3 daemons, quorum c,b,a
mgr: a(active)
osd: 3 osds: 3 up, 3 in