중요한건 꺾이지 않는 맥북
Kubeflow - Multi Tenancy(user) 본문
간단하게 k8s CLI (kubectl)로 kubeflow에 유저를 추가하는 방법을 정리한다.
User 추가
dex 에서 ID/PW를 생성한다. 아래와 같이 staticPassword 항목에 User 정보를 추가하고 hash에 bcrypt된 패스워드 입력한다.
$ kubectl edit cm -n auth dex
####################################################################################
...
- email: testuser@mz.co.kr
hash: $2y$12$4K/VkmDd1q1Orb3xAt82zu8gk7Ad6ReFR4LCP9UeYE90NLiN9Df72
# https://github.com/dexidp/dex/pull/1601/commits
# FIXME: Use hashFromEnv instead
username: test
userID: "test"
...
####################################################################################
$ kubectl rollout restart deployment dex -n auth
해당 ID/PW로 접속시 로그인이 가능하지만 namespace가 지정되지 않아 자원을 생성할 수 없기 때문에 Profile을 생성해야 한다.
Profile 생성
# profile.yaml 작성
################################################
apiVersion: kubeflow.org/v1beta1
kind: Profile
metadata:
name: testuser
spec:
owner:
kind: User
name: testuser@example.com
################################################
# profile 적용
$ kubectl apply -f profile.yaml
Profile 생성이 완료되면 User 이름으로 namespace가 생성되고 재 접속시 Namespace가 할당된 것을 확인 할 수 있다.
'MLOPS' 카테고리의 다른 글
Minio와 Postgresql 없이 MLflow 앱 배포하기 (0) | 2023.05.29 |
---|---|
Minio와 Postgresql를 활용하여 Multi-Tenant MLflow 배포하기 (0) | 2023.05.13 |
Kubeflow - Kubeadm K8s Single Cluster (0) | 2023.01.08 |
kubeflow (0) | 2023.01.01 |
CLOps-MLOps의 시작 (0) | 2022.08.13 |