This guide describes how to install Charmed Kubeflow (CKF) using Terraform.
You can do so by using any CNCF certified Kubernetes (K8s) cluster and deploying Kubeflow using the Terraform, Kubernetes and Juju Command Line Interfaces (CLIs).
Requirements
- A K8s cluster version 1.27-1.29 with a default storage class configured.
- Terraform CLI. You can install it using the snap.
Bootstrap Juju
CKF is deployed to Kubernetes with Juju. Before deployment, Juju must be bootstrapped to the K8s cluster. See Get started with Juju for more details.
Check Supported versions for version compatibility between CKF, Juju and K8s.
Deploy CKF
Deploy CKF as follows:
- Clone the repository and change directory to the Kubeflow module:
This command checks out the default branch, which should be track/1.9
. If that’s not the case, make sure to git checkout
to that branch.
git clone https://github.com/canonical/charmed-kubeflow-solutions
cd charmed-kubeflow-solutions/modules/kubeflow
- Initialise Terraform. The following command downloads all the required Terraform modules and installs the Terraform Juju provider:
terraform init
- Define credentials:
DEX_USERNAME="your-username"
DEX_PASSWORD="your-password"
- Deploy CKF using Terraform as follows:
terraform apply \
-var cos_configuration=true \
-var dex_static_username=$DEX_USERNAME \
-var dex_static_password=$DEX_PASSWORD \
-var kfp_db_revision=203 \
-var katib_db_revision=203
The command above:
- Creates a Juju model named
kubeflow
. - Deploys CKF
1.9/stable
. - Configures CKF to integrate with Canonical Observability Stack. See Monitoring for more details.
- Configures dex-auth charm with a static user username and password.
- Deploys a specific revision of mysql-k8s charm due to this bug.
See CKF Terraform solution for more details.
- Once the deployment is completed, you should see the Terraform solution module’s outputs:
Outputs:
grafana_agent_k8s = {
app_name = "grafana-agent-k8s-kubeflow"
provides = {
grafana_dashboards_provider = "grafana-dashboards-provider"
}
requires = {
logging_consumer = "logging-consumer"
send_remote_write = "send-remote-write"
}
}
kserve_controller = {
app_name = "kserve-controller"
provides = {
metrics_endpoint = "metrics-endpoint"
}
requires = {
ingress_gateway = "ingress-gateway"
local_gateway = "local-gateway"
logging = "logging"
object_storage = "object-storage"
secrets = "secrets"
service_accounts = "service-accounts"
}
}
model = "kubeflow"
tls_certificate_requirer = {
app_name = "istio-pilot"
requires = "certificates"
}
See Outputs for more details.
- Verify all charms are in `active` status by monitoring the Juju model:
juju status --watch 1s
This may take up to some minutes, depending on the cluster’s node specifications.
Access CKF dashboard
You can access the CKF dashboard through an IP address. See Access the dashboard for more details.
Last updated 3 days ago.