GunSik2 / k8s-ai

ai/bigdata/gpu examples with k8s
0 stars 0 forks source link

minio + k8s #12

Open GunSik2 opened 3 years ago

GunSik2 commented 3 years ago

minio + K8S 설치

kubectl minio version

- initialize the Operator

$ kubectl minio init $ kubectl get pods -n minio-operator NAME READY STATUS RESTARTS AGE console-6b6cf8946c-9cj25 1/1 Running 0 99s minio-operator-69fd675557-lsrqg 1/1 Running 0 99s

$ kubectl minio proxy -n minio-operator kubectl minio proxy Starting port forward of the Console UI. To connect open a browser and go to http://localhost:9090

Current JWT to login: TOKENSTRING

- Create tenant 

kubectl create ns minio-tenant-1 kubectl minio tenant create minio-tenant-1 \    --servers 4                             \      --volumes 16                            \      --capacity 16Ti                         \      --namespace minio-tenant-1              \       --storage-class standard

- Check

$ kubectl get tenant -n minio-tenant-1 NAME STATE AGE minio-tenant-1 Waiting for MinIO TLS Certificate 9m58s


## minio 싱글 노드 설치

$ wget https://dl.min.io/server/minio/release/linux-amd64/minio $ chmod +x minio $ ./minio server --console-address 127.0.0.1:37253 /data API: http://192.168.122.1:9000 http://127.0.0.1:9000
Console: http://0.0.0.0:37253
RootUser: minioadmin RootPass: minioadmin Command-line: https://docs.min.io/docs/minio-client-quickstart-guide $ mc alias set myminio http://192.168.122.1:9000 minioadmin minioadmin

클라이언트 접속 테스트
- Browser Access: http://192.168.122.1:34731 http://127.0.0.1:34731    
- CLI 테스트

$ mc alias set myminio http://192.168.122.1:9000 minioadmin minioadmin $ mc mb myminio/test/test1 $ mc cp minio/logs.log myminio/test/ minio/logs.log: 1.18 KiB / 1.18 KiB ┃▓▓▓┃ 193.24 KiB/s 0s $ mc ls -r myminio test [2021-09-24 18:13:46 KST] 1.2KiB logs.log [2021-09-24 18:11:07 KST] 0B test1/


참고
https://github.com/minio/operator/blob/master/README.md
https://blog.min.io/object_storage_as_a_service_on_minio/