Skip to content

civo-learn/civo-kubeflow

Repository files navigation

Civo DeployKF

Introduction

This project provides a Terraform configuration to set up a DeployKF on a k3s Civo Kubernetes cluster.

Prerequisites

  • Civo account with API key
  • Terraform installed on your system
  • Kubernetes client (e.g., Lens, kubectl, k9s etc) for interacting with the cluster
  • Bash version 4.4 or higher installed on your system (required for the sync script)
  • ArgoCD CLI (optional, for managing DeployKF deployments)

You can upgrade your Bash version on macOS using Homebrew:

brew install bash

This installation will typically place the new Bash binary in /opt/homebrew/bin/bash. You will need to specify this path in the terraform.tfvars file.

Infrastructure Setup

To set up and deploy the Kubernetes cluster, follow these steps:

  1. Create terraform.tfvars from the template:
civo_token = "your_civo_api_key"
region     = "your_civo_region"  # Change to your preferred region. Default is "LON1".
bash_path  = "your_bash_path"  # Change this to your preferred bash path. Default is "/opt/homebrew/bin/bash" (Installed with brew).

Replace "your_civo_api_key" with your actual Civo API key.

  1. Initialize Terraform:
terraform init
  1. Plan the Terraform configuration:
terraform plan
  1. Apply the Terraform configuration:
terraform apply
  1. Retrieve the kubeconfig from the Civo dashboard and load it into your kubecontext.

ArgoCD (Optional)

DeployKF is deployed through ArgoCD, which is already installed on the cluster provisioned through Terraform. You can access the ArgoCD Web UI to see the DeployKF application being deployed. This is optional but recommended to see if anything goes wrong during the deployment.

You can first expose the ArgoCD service by patching the service to use a LoadBalancer:

kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'

You can then access ArgoCD using the LoadBalancer IP address. The default username is admin, and the password can be retrieved using:

echo $(kubectl -n argocd get secret/argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d)

Accessing Kubeflow

The DeployKF dashboard is exposed through the LoadBalancer IP address of the deploykf-gateway service. This service is automatically created by DeployKF and will route traffic to the Kubeflow dashboard.

IMPORTANT NOTE: You cannot access the Kubeflow dashboard using the LoadBalancer IP address directly. Instead, you need to set up a DNS record that points to the LoadBalancer IP address.

Add this to your /etc/hosts file for local testing:

<LoadBalancer_IP> deploykf.example.com
<LoadBalancer_IP> argo-server.deploykf.example.com
<LoadBalancer_IP> minio-api.deploykf.example.com
<LoadBalancer_IP> minio-console.deploykf.example.com

Deploying to Production

For a fully secure connection to the ArgoCD web UI and Kubeflow dashboard, we recommend configuring a custom TLS certificate using an Ingress resource. This ensures encrypted communication and verifies the identity of your application endpoints.

For additional resources, see Cert Manager and Lets Encrypt documentation.

Troubleshooting

  • Common issues and their solutions will be documented here. For more information on troubleshooting DeployKF, please refer to the official documentation.

Configuration Files

  • terraform.tfvars: Contains the Civo API key and other variables for Terraform.
  • deploykf-values.yaml: Configuration for DeployKF, a Kubernetes deployment tool.

Contributing and Support

  • Contributions are welcome. Please submit pull requests or issues on our GitHub repository.
  • For support, please contact raise a GitHub issue in this repository.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •