k8s storage
설치
https://github.com/openebs/charts
kubectl apply -f https://raw.githubusercontent.com/openebs/charts/gh-pages/openebs-operator.yaml
테스트
pvc 생성
1
2
3
4
5
6
7
8
9
10
11
12
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: default-pvc
namespace: default
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: "openebs-hostpath"
pvc를 사용하는 deployment 생성
undefined
storage IOPS 확인
kubestr 설치
https://github.com/kastenhq/kubestr/releases/download/v0.4.16/kubestr-v0.4.16-linux-amd64.tar.gz
fio 스크립트 작성
https://github.com/axboe/fio/tree/master/examples?source=post_page—–56438efb23b7——————————–
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
; fio-rand-read.job for fiotest
[global]
name=fio-rand-read
filename=fio-rand-read
rw=randread
bs=4K
direct=0
numjobs=1
time_based
runtime=900
[file1]
size=10G
ioengine=libaio
iodepth=16
kubestr 실행
1
kubestr fio -f fio-rand-read-Diamanti.fio -s openebs-hostpath
Default storageClass 변경
Default 스토리지 클래스는 일반적으로 업로드 중에 특정 스토리지 클래스가 지정되지 않은 경우 클라우드 스토리지 서비스에 업로드된 객체에 자동으로 할당되는 스토리지 클래스를 나타낸다. 클라우드 스토리지 공급자마다 기본 스토리지 클래스가 다를 수 있다. 예를 들어 AWS는 S3가 기본 스토리지 클래스로 구성되고, GCP에서는 GSC(Google Cloud Storage)가 기본 스토리지 클래스로 구성된다.
on-premise에서 default storage class
Default stoage class는 kubectl get sc
명령을 통해 화인할 수 있는데, name앞에 (default)
라는 명칭에 붙게 된다.
1
2
3
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
openebs-device openebs.io/local Delete WaitForFirstConsumer false 3d7h
openebs-hostpath (default) openebs.io/local Delete WaitForFirstConsumer false 3d7h
Default stoage class를 다음과 같이 지정할 수 있다.
1
kubectl patch storageclass ${storageClassName} -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
Link
https://jerryljh.medium.com/kubestr-kube-storage-iops-측정-툴-56438efb23b7
This post is licensed under CC BY 4.0 by the author.