아래 저장소 주소(
packages.cloud.google.com·apt.kubernetes.io)는 2024년 3월에 닫혔다. 그대로 따라 하면 패키지를 받을 수 없다.
현행 버전 설치는 Kubernetes v1.37 설치 가이드 를 볼 것. 아래 내용은 절차 참고용으로 남긴다.
# Ubuntu
sudo apt-get install -y virt-manager virt-viewer qemu-kvm qemu-system virtualbox linux-headers-`uname -r` virtualbox-dkms
sudo usermod -aG libvirtd $USER
# CentOS
$ sudo yum install qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer bridge-utils
$ sudo systemctl start libvirtd
$ sudo systemctl enable libvirtd
#Ubuntu
sudo apt-get update && sudo apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
sudo touch /etc/apt/sources.list.d/kubernetes.list
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl
# CentOS
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF
sudo yum install -y kubectl
# Ubuntu or CentOS
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.28.0/minikube-linux-amd64
$ chmod +x minikube
$ sudo mv minikube /usr/local/bin/
Start your minikube cluster
$ minikube start --cpus 4 --memory 8096 --disk-size=40g
sudo mkdir /etc/vbox
sudo vi /etc/vbox/networks.conf
# 다음 두 줄 추가
* 10.0.0.0/8 192.168.0.0/16
* 2001::/64
Installing Kubeflow using Bootstrapper
The following steps will deploy Kubeflow components and start them on the Minikube you created above.
Download bootstrapper configuration file.
$ curl -O https://raw.githubusercontent.com/kubeflow/kubeflow/v0.2-branch/bootstrap/bootstrapper.yaml
Apply the config.
$ kubectl create -f bootstrapper.yaml
This should output
namespace "kubeflow-admin" created
clusterrolebinding.rbac.authorization.k8s.io "kubeflow-cluster-admin" created
persistentvolumeclaim "kubeflow-ksonnet-pvc" created
statefulset.apps "kubeflow-bootstrapper" created
Verify the setup worked.
$ kubectl get ns
NAME STATUS AGE
default Active 1m
kube-public Active 1m
kube-system Active 1m
kubeflow-admin Active 53s
$ kubectl -n kubeflow get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
ambassador ClusterIP 10.97.168.31 <none> 80/TCP 1m
ambassador-admin ClusterIP 10.99.5.81 <none> 8877/TCP 1m
centraldashboard ClusterIP 10.111.104.142 <none> 80/TCP 1m
k8s-dashboard ClusterIP 10.102.65.244 <none> 443/TCP 1m
tf-hub-0 ClusterIP None <none> 8000/TCP 1m
tf-hub-lb ClusterIP 10.101.15.28 <none> 80/TCP 1m
tf-job-dashboard ClusterIP 10.106.133.49 <none> 80/TCP 1m
Setup port forwarding for the central dashboard UI and Jupyter Hub
$ POD=`kubectl -n kubeflow get pods --selector=service=ambassador | awk '{print $1}' | tail -1`
$ kubectl -n kubeflow port-forward $POD 8080:80 2>&1 >/dev/null &
$ POD=`kubectl -n kubeflow get pods --selector=app=tf-hub | awk '{print $1}' | tail -1`
$ kubectl -n kubeflow port-forward $POD 8000:8000 2>&1 >/dev/null &
Now you can access the Kubeflow dashboard at http://localhost:8080/ and JupyterHub at http://localhost:8000/. For JupyterHub, you’ll be landing on a login page.
Use any username and password to login
Pick an available CPU tensorflow image
Provide at least 2 CPUs
Provide 4Gi for the memory
Leave “Extra Resource Limits” alone for now
Click Spawn.
You should be redirected to a page that waits while the server is starting.
If the page doesn’t refresh, please see troubleshooting.