본문 바로가기
Kubeflow/Install

Kubeflow 1.4.1 in Minikube 구성

by 여행을 떠나자! 2021. 12. 30.

1. 개요

- minikube에 Kubeflow 1.4.1을 설치한다.

- Kubeflow 설치 방식이 버전 1.2까지는 kfctl를 사용하였으나, 1.3부터는 kustomize를 사용한다.

   ✓ kfctl is a CLI for deploying and managing Kubeflow, Latest release: 1.2.0(21 Nov 2020), https://github.com/kubeflow/kfctl

       ▷ Kubeflow 1.2 in On-prem 구성

       ▷ Kubeflow 1.2 in Minikube 구성

   ✓ Kubeflow 1.4.1는 Istio 1.9.6, Knative 0.22.1을 포함하고 있다.

 

 

2. 환경

- kubeflow 1.4.1

- minikube 1.17.1

- kubernetes 1.20.11

- macOS 12.1

 

 

3. Kubeflow Install

- 참고 문서:  https://github.com/kubeflow/manifests

 

a. Prerequisites

- Kubernetes 

   Minikube에서 Kubeflow가 설치/실행 될 수 있도록 리소스(CPU/Memory)를 할당하여 kubernetes 1.20.11를 설치한다.

   kubeflow 설치에 필요한 default storageclass는 자동으로 구성된다. 

yoosungjeon@ysjeon-Dev ~ % minikube start --driver=hyperkit --kubernetes-version=1.20.11 --memory=8g —cpus=4 --profile kf-1.4
😄  [kf-1.4] Darwin 12.1 위의 minikube v1.17.1
✨  유저 환경 설정 정보에 기반하여 hyperkit 드라이버를 사용하는 중
👍  kf-1.4 클러스터의 kf-1.4 컨트롤 플레인 노드를 시작하는 중
🔥  hyperkit VM (CPUs=4, Memory=8192MB, Disk=20000MB) 를 생성하는 중 ...
🐳  쿠버네티스 v1.20.11 을 Docker 20.10.2 런타임으로 설치하는 중
    ▪ Generating certificates and keys ...
    ▪ Booting up control plane ...
    ▪ Configuring RBAC rules ...
🔎  Verifying Kubernetes components...
🌟  Enabled addons: storage-provisioner, default-storageclass
🏄  Done! kubectl is now configured to use "kf-1.4" cluster and "default" namespace by default
yoosungjeon@ysjeon-Dev ~ % minikube addons list -p kf-1.4
|-----------------------------|---------|--------------|
|         ADDON NAME          | PROFILE |    STATUS    |
|-----------------------------|---------|--------------|
| ambassador                  | kf-1.4  | disabled     |
| csi-hostpath-driver         | kf-1.4  | disabled     |
| dashboard                   | kf-1.4  | disabled     |
| default-storageclass        | kf-1.4  | enabled ✅   |
...
💡  To see addons list for other profiles use: `minikube addons -p name list`
(base) yoosungjeon@ysjeon-Dev ~ % minikube profile list
|---------|-----------|---------|---------------|------|----------|---------|-------|
| Profile | VM Driver | Runtime |      IP       | Port | Version  | Status  | Nodes |
|---------|-----------|---------|---------------|------|----------|---------|-------|
| kf-1.4  | hyperkit  | docker  | 192.168.64.35 | 8443 | v1.20.11 | Running |     1 |
|---------|-----------|---------|---------------|------|----------|---------|-------|
yoosungjeon@ysjeon-Dev ~ %

 

- kubectl

   ✓ 본 문서에서는 맥에 설치되어 있는 kubectl를 사용하였다.

   ✓ 신규로 설치하고자 할 경우 'https://kubernetes.io/ko/docs/tasks/tools/install-kubectl-macos/'를 참조해라.

yoosungjeon@ysjeon-Dev ~ % k version --short
Client Version: v1.20.4
Server Version: v1.20.11
yoosungjeon@ysjeon-Dev ~ %

 

- Kustomize 

   ✓ Kustomize는 kustomization 파일을 통해 Kubernetes 오브젝트를 사용자가 원하는 대로 변경하는(customize) 툴이다.  

   ✓ 본 문서에서는 맥에 설치되어 있는 kustomize (v4.0.5)를 사용하였다.

   ✓ Kubeflow 문서에서는 kustomize 4.x 최신 버전과는 호환되지 않으며 3.2.0 사용을 권고하고 있다.

   ✓ 신규로 설치하고자 할 경우 'https://github.com/kubernetes-sigs/kustomize/releases/tag/v3.2.0'를 이용해라.

 

b. Kubeflow 설치

- Kubeflow를 설치하는 방법으로는 단일 명령어 설치와 개별 컴포넌트 설치가 있다. 

- github에서 Kubeflow Manifests 최신 소스를 복제한다.

yoosungjeon@ysjeon-Dev ~ % git clone https://github.com/kubeflow/manifests.git
Cloning into 'manifests'...
remote: Enumerating objects: 24459, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 24459 (delta 4), reused 4 (delta 1), pack-reused 24445
Receiving objects: 100% (24459/24459), 41.43 MiB | 17.53 MiB/s, done.
Resolving deltas: 100% (14561/14561), done.
Checking out files: 100% (7076/7076), done.
yoosungjeon@ysjeon-Dev ~ % cd manifests
yoosungjeon@ysjeon-Dev manifests %

 

- Kubeflow 1.4.1를 단일 명령어로 설치한다.   

   "while ! kustomize build example | kubectl apply -f -; do echo "Retrying to apply resources"; sleep 10; done"

yoosungjeon@ysjeon-Dev manifests % while ! kustomize build example | kubectl apply -f -; do echo "Retrying to apply resources"; sleep 10; done
2021/12/29 17:05:37 well-defined vars that were never replaced: kfp-app-version,kfp-app-name
namespace/auth created
namespace/cert-manager created
namespace/istio-system created
namespace/knative-eventing created
namespace/knative-serving created
namespace/kubeflow created
customresourcedefinition.apiextensions.k8s.io/apiserversources.sources.knative.dev created
...
validatingwebhookconfiguration.admissionregistration.k8s.io/trainedmodel.serving.kubeflow.org configured
yoosungjeon@ysjeon-Dev manifests %

kubeflow-1.4.1-install.log
0.08MB

 

- Kubeflow의 Pod들이 정상적으로 기동 되었는지 확인한다.

% k get pod -A | egrep 'NAME|^auth|^cert-manager|^istio-system|^knative-|^kubeflow'
NAMESPACE                   NAME                                                         READY   STATUS    RESTARTS   AGE
auth                        dex-5ddf47d88d-mdd4f                                         1/1     Running   1          17h
cert-manager                cert-manager-7dd5854bb4-76zmc                                1/1     Running   0          17h
cert-manager                cert-manager-cainjector-64c949654c-2zv7h                     1/1     Running   2          17h
cert-manager                cert-manager-webhook-6bdffc7c9d-gt8zg                        1/1     Running   2          17h
istio-system                authservice-0                                                1/1     Running   0          17h
istio-system                cluster-local-gateway-7bf6b98855-vg9cb                       1/1     Running   0          17h
istio-system                istio-ingressgateway-78bc678876-rc59j                        1/1     Running   0          17h
istio-system                istiod-755f4cc457-4xh8s                                      1/1     Running   0          17h
knative-eventing            eventing-controller-64d97555b-44lnz                          1/1     Running   0          17h
knative-eventing            eventing-webhook-5c5b8d5c6d-h4c65                            1/1     Running   1          17h
knative-eventing            imc-controller-688df5bdb4-k6942                              1/1     Running   0          17h
knative-eventing            imc-dispatcher-5dbb47f555-4pc7l                              1/1     Running   11         17h
knative-eventing            mt-broker-controller-856784c8ff-z92m7                        1/1     Running   0          17h
knative-eventing            mt-broker-filter-68fcfcc6c8-r7qvh                            1/1     Running   0          17h
knative-eventing            mt-broker-ingress-bd54bc995-pspjv                            1/1     Running   1          17h
knative-serving             activator-546897c9dd-plpts                                   2/2     Running   1          17h
knative-serving             autoscaler-7ffbf6d595-dz8g4                                  2/2     Running   1          17h
knative-serving             controller-5894998d7b-5nq86                                  2/2     Running   1          17h
knative-serving             istio-webhook-578b6b7654-rw7fv                               2/2     Running   1          17h
knative-serving             networking-istio-6b88f745c-h64x6                             2/2     Running   1          17h
knative-serving             webhook-c59cc5b48-pzrzm                                      2/2     Running   1          17h
kubeflow-user-example-com   ml-pipeline-ui-artifact-5dd95d555b-mdjjm                     2/2     Running   0          17h
kubeflow-user-example-com   ml-pipeline-visualizationserver-6b44c6759f-rp6w5             2/2     Running   0          17h
kubeflow                    admission-webhook-deployment-667bd68d94-mw869                1/1     Running   0          17h
kubeflow                    cache-deployer-deployment-79fdf9c5c9-6l45w                   2/2     Running   1          17h
kubeflow                    cache-server-6566dc7dbf-bv7ft                                2/2     Running   0          17h
kubeflow                    centraldashboard-7d496c59bb-6h2xq                            1/1     Running   2          17h
kubeflow                    jupyter-web-app-deployment-84c459d4cd-mfdlq                  1/1     Running   0          17h
kubeflow                    katib-controller-68c47fbf8b-vstz6                            1/1     Running   0          17h
kubeflow                    katib-db-manager-6c76bdc855-4q5s4                            1/1     Running   4          17h
kubeflow                    katib-mysql-6dcb447c6f-ttspd                                 1/1     Running   3          17h
kubeflow                    katib-ui-64bb96d5bf-mc5r9                                    1/1     Running   0          17h
kubeflow                    kfserving-controller-manager-0                               2/2     Running   0          17h
kubeflow                    kfserving-models-web-app-5d6cd6b5dd-srvjs                    2/2     Running   0          17h
kubeflow                    kubeflow-pipelines-profile-controller-69596b78cc-rmr5w       1/1     Running   0          17h
kubeflow                    metacontroller-0                                             1/1     Running   0          17h
kubeflow                    metadata-envoy-deployment-5b4856dd5-hrd6v                    1/1     Running   0          17h
kubeflow                    metadata-grpc-deployment-748f868f64-9dq98                    2/2     Running   3          17h
kubeflow                    metadata-writer-548bd879bb-dlqvn                             2/2     Running   2          17h
kubeflow                    minio-5b65df66c9-5dmfc                                       2/2     Running   0          17h
kubeflow                    ml-pipeline-84964dcc8-5nz89                                  2/2     Running   11         17h
kubeflow                    ml-pipeline-persistenceagent-d6bdc77bd-pcht4                 2/2     Running   1          17h
kubeflow                    ml-pipeline-scheduledworkflow-5db54d75c5-qlpcx               2/2     Running   0          17h
kubeflow                    ml-pipeline-ui-5447cb9556-gqh96                              2/2     Running   10         17h
kubeflow                    ml-pipeline-viewer-crd-68fb5f4d58-zz9nk                      2/2     Running   1          17h
kubeflow                    ml-pipeline-visualizationserver-cf88b98f7-gx2bh              2/2     Running   10         17h
kubeflow                    mpi-operator-5c55d6cb8f-v6r7h                                1/1     Running   4          17h
kubeflow                    mysql-f7b9b7dd4-rgbcv                                        2/2     Running   0          17h
kubeflow                    notebook-controller-deployment-bb577f6bc-87kpk               1/1     Running   1          17h
kubeflow                    profiles-deployment-866d7485fc-7mnnr                         2/2     Running   1          17h
kubeflow                    tensorboard-controller-controller-manager-775777c4c5-tcgr8   3/3     Running   2          17h
kubeflow                    tensorboards-web-app-deployment-6ff79b7f44-c54dw             1/1     Running   0          17h
kubeflow                    training-operator-795c5cb864-f9jzr                           1/1     Running   0          17h
kubeflow                    volumes-web-app-deployment-8589d664cc-shd6v                  1/1     Running   0          17h
kubeflow                    workflow-controller-76dd87cd85-s7j9w                         2/2     Running   2          17h
%

 

 

4. Kubeflow Central Dashboard 접속

- Dashboard에 접속하기 위한 URL 정보를 조회한다.

   Kubeflow Central Dashboard는 Istio를 통해서 제공되기 때문에 istio-ingressgateway 서비스의 NodePort 정보를 알아야 한다. 

yoosungjeon@ysjeon-Dev ~ % k get svc istio-ingressgateway -n istio-system
NAME                   TYPE       CLUSTER-IP      EXTERNAL-IP   PORT(S)                                                                      AGE
istio-ingressgateway   NodePort   10.104.18.186   <none>        15021:30518/TCP,80:32068/TCP,443:32591/TCP,31400:30009/TCP,15443:32260/TCP   18h
yoosungjeon@ysjeon-Dev ~ % minikube service list -p kf-1.4
|------------------|---------------------------------|-------------------|----------------------------|
|    NAMESPACE     |              NAME               |    TARGET PORT    |            URL             |
|------------------|---------------------------------|-------------------|----------------------------|
...
| istio-system     | cluster-local-gateway           | No node port      |                            |
| istio-system     | istio-ingressgateway            | status-port/15021 | http://192.168.64.35:30518 |
|                  |                                 | http2/80          | http://192.168.64.35:32068 |
|                  |                                 | https/443         | http://192.168.64.35:32591 |
|                  |                                 | tcp/31400         | http://192.168.64.35:30009 |
|                  |                                 | tls/15443         | http://192.168.64.35:32260 |
| istio-system     | istiod                          | No node port      |                            |
...
yoosungjeon@ysjeon-Dev ~ %

 

- Dashboard에 접속한다.

   URL: http://192.168.64.35:32068

   Email / Password: user@example.com / 12341234

     암호를 변경하고자 할 경우 'https://github.com/kubeflow/manifests#change-default-user-password'를 참조해라

 

'Kubeflow > Install' 카테고리의 다른 글

Kubeflow 1.2 in On-prem 구성  (0) 2021.09.24
Kubeflow 1.2 in Minikube 구성  (0) 2021.09.24
Kubeflow 1.0 in On-prem 구성  (0) 2021.09.24
Kubeflow 1.0 using MiniKF 구성 (Windows 10)  (0) 2021.09.24
Kubeflow 1.0 in GCE 구성  (0) 2021.09.24

댓글