This example will help you try Kubeflow Helm in your development environment.
Note
The simplest environment setup may be to fork this repo and open it using github codespaces.
-
2 cpus and 8G memory in your dev environment (local or via SSH)
-
If you are running on a laptop/vm with docker: Higher limits for file handlers (this gets reset on system restart)
# Note that these must be run outside of a container sudo sysctl fs.inotify.max_user_instances=1280 sudo sysctl fs.inotify.max_user_watches=655360
-
A working docker daemon (can be docker in docker if using devcontainers) verify with:
docker run -it --rm hello-world
-
some CLI tools on your PATH
- A recent terraform version e.g. v1.6.2:
terraform -version
- A recent helm e.g. v3.14.1:
helm version
- A recent k3d version e.g. v5.6.0
k3d --version
- A recent terraform version e.g. v1.6.2:
Some tools can make this process easier:
- K9s
- VSCode and extensions:
- Docker
- Resource Monitor
- Kubernetes
- Remote containers/Remote SSH
Clone this repo (if not in codespaces) and use the makefile to setup kubernetes:
git clone https://github.com/treebeardtech/terraform-helm-kubeflow.git
cd terraform-helm-kubeflow
export KUBECONFIG=~/.kube/demo.yaml
rm $KUBECONFIG # remove if exists from previous attempts
make k3d-create
Once complete, verify the API server has started:
kubectl get nodes
Initialise the terraform environment
cd examples/k3s
terraform init
Create a plan and apply the infra install
terraform apply -var kubeconfig=$KUBECONFIG
Watch k9s pods until all of them are in a ready state.
You can also check argocd with:
kubectl port-forward --namespace "argocd" svc/argo-cd-argocd-server 8081:80
then go the localhost:8081 and enter username 'admin', password (decoded argocd/argocd-initial-admin-secret
)
Once all is finished you can port forward into the ingress gateway:
kubectl port-forward --namespace "istio-system" svc/istio-ingressgateway 8080:http2
then go to http://localhost:8080/ to see the login page
terraform destroy -var kubeconfig=$KUBECONFIG
Login with user: [email protected]
, pass: 12341234
Try creating a Jupyter Notebook server with 0.1 CPU via the web UI.
This shows you how you can start developing Kubeflow Helm into your infrastructure.
Customisation and deployment for your team is another matter and will be discussed in subsequent tutorials.
k3d cluster delete demo
🚨 delete your codespace if you created one, they cost money based on how long they are running
Name | Version |
---|---|
helm | ~> 2.12.1 |
No providers.
Name | Source | Version |
---|---|---|
treebeardkf | ../.. | n/a |
No resources.
Name | Description | Type | Default | Required |
---|---|---|---|---|
kubeconfig | n/a | string |
n/a | yes |
No outputs.