-
[Jupyterhub for Kubernetes-2] JupyterHub 설치Backend/Kubernetes 2022. 3. 20. 16:46728x90
1. JupyterHub Chart 설치
helm 명령어와 Helm chart에서 repository를 찾아 jupyterhub chart를 설치할 수 있다.
helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/ helm repo update
다음과 같은 출력이 나온다. Happy Helming!
Hang tight while we grab the latest from your chart repositories... ...Skip local chart repository ...Successfully got an update from the "stable" chart repository ...Successfully got an update from the "jupyterhub" chart repository Update Complete. ⎈ Happy Helming!⎈
2. config.yaml이 포함된 디렉토리에서 다음 명령어를 실행하여 차트를 설치한다.
helm upgrade --cleanup-on-fail \ --install <helm-release-name> jupyterhub/jupyterhub \ --namespace <k8s-namespace> \ --create-namespace \ --version=<chart-version> \ --values config.yaml
document에 설명이 되어있긴 하지만 각각 뭘 뜻하는 건지 정확히 몰라서 결국은 해보면서 찾았다.
- helm-release-name : 원하는 release 이름
- k8s-namespace : 원하는 namespace 명
- chart-version : jupyterhub chart의 버전
- 버전 확인
helm search repo
example>
helm upgrade --cleanup-on-fail \ --install celljupyter jupyterhub/jupyterhub \ --namespace jhub \ --create-namespace \ --version=1.2.0 \ --values config.yaml
ERROR 1
만약 다음과 같은 에러가 발생한다면 이는 default storage class가 2개이기 때문에 발생된 것이다.
이는 두가지 해결방법이 있다.
- default storage class 중 하나를 삭제
- default로 되어있는 class 중 하나의 default 설정을 바꾸기
첫번째 방식의 경우 다음의 명령어를 통해 default storage class중 하나를 삭제하여 해결할 수 있다.
kubectl patch storageclass <your-class-name> -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
이때 your-class-name은 삭제할 class명을 적어야하는데 다음의 명령어를 통해 존재하는 storage class를 확인할 수 있다.
microk8s kubectl get storageclasses.storage.k8s.io
두번째 방식의 경우 다음의 명령어를 통해 두가지 default storage class 중에서 하나의 default 설정을 false로 바꾼다.
kubectl patch storageclass <your-storageclass-name> -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
<your-storageclass-name>의 경우 본인이 원하는 storageclass명을 적으면 된다.
나의 경우 두번째 방식을 택하여 microk8s-hostpath의 default 설정을 false로 바꾸었다.
ERROR 2
Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version": dial tcp 127.0.0.1:8080: connect: connection refused
kubectl config view --raw > ~/.kube/config
ERROR 3
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /home/miraebox/.kube/config WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /home/miraebox/.kube/config
chmod 600 ~/.kube/config
작성중....
728x90'Backend > Kubernetes' 카테고리의 다른 글
[Minikube] Docker image를 minikube cluster로 실행하기 (0) 2022.04.10 [Minikube] Virtual box Ubuntu20.04에 minikube 설치 (1) 2022.03.27 [Jupyterhub for Kubernetes-1] MicroK8s를 통한 Bare Metal Host상의 kubernetes 설치 및 helm 설치 (0) 2022.03.16