Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hsinhoyeh/c5f60b4cbe41a1e6478ae5ea10f47497 to your computer and use it in GitHub Desktop.
Save hsinhoyeh/c5f60b4cbe41a1e6478ae5ea10f47497 to your computer and use it in GitHub Desktop.
update to kubeflow 1.2
//installation doc: https://www.kubeflow.org/docs/started/workstation/minikube-linux/
// note: use driver=none to disable any virtual machine on top of ubuntu
0. install docker
```
apt-get update
apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
apt-get update
apt-get install docker-ce docker-ce-cli containerd.io
usermod -aG docker $USER
```
1.install kubectl verision:
```
KUBECTL_VERSION=v1.20.1
curl -LO https://storage.googleapis.com/kubernetes-release/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl
chmod +x ./kubectl
mv ./kubectl /usr/local/bin/kubectl
```
2. install minikube version(1.16.0):
```
MINIKUBE_VERSION=v1.16.0
curl -Lo minikube https://storage.googleapis.com/minikube/releases/$MINIKUBE_VERSION/minikube-linux-amd64
chmod +x minikube
mv minikube /usr/local/bin/
```
3. apt install
```
apt-get install -y conntrack
apt-get install -y socat
apt-get install -y selinux-utils
apt-get install -y ebtables ethtool
```
4. start minikube with RBAC + driver=none
```
KUBECTL_VERSION=v1.20.1
minikube start \
--vm-driver=none \
--kubernetes-version=$KUBECTL_VERSION \
--extra-config=controller-manager.node-cidr-mask-size=16 \
--extra-config=controller-manager.allocate-node-cidrs=true \
--extra-config=controller-manager.cluster-cidr=10.244.0.0/16 \
--extra-config=apiserver.authorization-mode=Node,RBAC \
--extra-config=apiserver.service-account-signing-key-file=/var/lib/minikube/certs/sa.key \
--extra-config=apiserver.service-account-issuer=kubernetes.default.svc \
--extra-config=kubeadm.ignore-preflight-errors=SystemVerification \
--extra-config=kubeadm.pod-network-cidr=10.244.0.0/16 \
--extra-config=kubelet.resolv-conf=/run/systemd/resolve/resolv.conf
```
// note: you have to specify kubernetes version, otherwise it could fetch a newer version.
5. install kubeflow
```
wget https://github.com/kubeflow/kfctl/releases/download/v1.2.0/kfctl_v1.2.0-0-gbc038f9_linux.tar.gz
tar -xzvf kfctl_v1.2.0-0-gbc038f9_linux.tar.gz
```
6. prepare kubeflow
export PATH=$PATH:/home/<$user>/kubeflow/v1.2 // where kfctl stored
export KF_NAME=my-kubeflow
export BASE_DIR=/home/<$user>/kubeflow/v1.2
export KF_DIR=${BASE_DIR}/${KF_NAME}
cd $KF_DIR && \
mkdir kfctl_k8s_istio.v1.2.0 && \
cd kfctl_k8s_istio.v1.2.0 && \
kfctl apply -V -f https://raw.githubusercontent.com/kubeflow/manifests/master/distributions/kfdef/kfctl_k8s_istio.v1.2.0.yaml
cd $KF_DIR && \
mkdir kfctl_istio_dex.v1.2.0 && \
cd kfctl_istio_dex.v1.2.0 && \
kfctl apply -V -f https://raw.githubusercontent.com/kubeflow/manifests/master/distributions/kfdef/kfctl_istio_dex.v1.2.0.yaml
//6. add admin group--
//kubectl create clusterrolebinding default-admin --clusterrole=cluster-admin [email protected]
7.
updating user accoutn/password
```
kubectl get configmap dex -n auth -o jsonpath='{.data.config\.yaml}' > dex-config.yaml
vim dex-config.yaml // updating the yaml file by add user/password
kubectl create configmap dex --from-file=config.yaml=dex-config.yaml -n auth --dry-run -oyaml | kubectl apply -f -
kubectl rollout restart deployment dex -n auth
```
8. remove remove anonymous login
kubectl delete envoyfilter add-user-filter -n istio-system
kubectl delete pods authservice-0 -n istio-system // restart auth service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment