-
Notifications
You must be signed in to change notification settings - Fork 12
MiniKF Guide
- Install Vagrant and Virtual Box.
- Create a new directory and run
vagrant init arrikto/minikf
and thenvagrant up
(takes about 20 minutes to boot). - Navigate to
http://10.10.10.10
. - Follow on-screen steps to start Kubeflow and Rok (takes about another 20 minutes).
- From here, you can use Kubeflow and Rok.
-
Download your minikf-kubeconfig file from http://10.10.10.10 and save it to your home directory
-
run
export KUBECONFIG=$HOME/minikf-kubeconfig
-
Login to azure and docker
az acr login k8scc01covidacrdev #login with statcan credentials docker login k8scc01covidacrdev.azurecr.io #this will create a docker config.json that will be used for creating your secret #see link below to find the docker credentials to use
Use the username and password here for docker login.
-
create secret
kubectl create secret generic regcred \ --from-file=.dockerconfigjson=<path/to/.docker/config.json> \ --type=kubernetes.io/dockerconfigjson
-
create a Pod that uses your Secret
wget -O my-private-reg-pod.yaml https://k8s.io/examples/pods/private-reg-pod.yaml
-
open the yaml file and replace
<your-private-image>
with the path to an image in a private registry such as:k8scc01covidacrdev.azurecr.io/hello-world:1
The
imagePullSecrets
field in the configuration file specifies that Kubernetes should get the credentials from a Secret namedregcred
. Change that name field according to what you named your secret. -
create Pod and see status:
kubectl apply -f my-private-reg-pod.yaml kubectl get pod private-reg
You should see status as Running (give it a few minutes if still in Pending status). You can also use
kubectl describe pods/<pod-name>
to get more details.
The API server will connect to the Kubeflow cluster from your current kubectl
context.
- Clone jupyter-apis repository and Install Go
- Copy your
minikf-kubeconfig
file to the.kube
folder in your home directory (useCtrl+H
to show hidden items). - Replace
"config"
with"minikf-kubeconfig"
at this line in main.go. Remember to change this back before committing any changes in git. - Change directory to project root:
cd jupyter-apis
- Run
go run . -spawner-config samples/spawner_ui_config.yaml
(or use an alternative YAML config)
The front-end is configured to proxy requests to the local API server. It requires an environment variable (KF_USER_ID
) to specify the current user – this is passed to the API server as an HTTP header.
- Change directory to front-end folder:
cd frontend
- Install dependencies:
npm install
- Run the front-end
KF_USER_ID=<profile_name> npm start
The front-end is now available at http://localhost:4200/jupyter/
. Since it is disconnected from the centraldashboard
component, you need to type your created namespace in the UI rather than selecting it from a dropdown.
TODO:
- add steps for creating a profile/namespace