### Download deployKF Sample Values File using curl Source: https://www.deploykf.org/guides/getting-started Downloads the sample-values.yaml file for a specific version of deployKF using the curl command. This file serves as a starting point for custom configurations. It specifies the output file name and the URL of the raw file from GitHub. ```shell # download the `sample-values.yaml` file curl -fL -o "sample-values-0.1.5.yaml" \ "https://raw.githubusercontent.com/deployKF/deployKF/v0.1.5/sample-values.yaml" ``` -------------------------------- ### Run deployKF Sync Script (Bash) Source: https://www.deploykf.org/guides/getting-started Executes the automated script for syncing ArgoCD applications. This script can take significant time on initial setup and is resilient to interruptions, allowing safe re-runs. Configuration variables at the script's top allow for customization. ```bash bash ./sync_argocd_apps.sh ``` -------------------------------- ### Install deployKF CLI on Linux Source: https://www.deploykf.org/guides/deploykf-cli Downloads and installs the deployKF CLI for Linux. This script fetches the binary, places it in /usr/local/bin, and makes it executable. It automatically detects and handles different architectures (amd64/arm64). After installation, you can verify it using 'deploykf version'. ```bash DKF_CLI_VERSION="0.1.2" DKF_CLI_ARCH=$(uname -m | sed -e 's/x86_64/amd64/' -e 's/aarch64/arm64/') DFK_CLI_DEST=/usr/local/bin/deploykf # download the binary sudo curl -fL "https://github.com/deploykf/cli/releases/download/v${DKF_CLI_VERSION}/deploykf-linux-${DKF_CLI_ARCH}" -o "${DFK_CLI_DEST}" # make the binary executable sudo chmod +x "${DFK_CLI_DEST}" # test the binary deploykf version ``` -------------------------------- ### Install Homebrew for Linux Source: https://www.deploykf.org/guides/local-quickstart Installs Homebrew, a package manager for Linux, macOS, and Windows. It uses curl to download and execute the installation script from GitHub. ```bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` -------------------------------- ### Install ArgoCD and DeployKF Plugin Source: https://www.deploykf.org/guides/local-quickstart Clones the DeployKF repository, makes the ArgoCD installation script executable, and then runs the script to install ArgoCD and the DeployKF ArgoCD Plugin into the current kubectl context. This process sets up ArgoCD for managing DeployKF applications. ```bash # clone the deploykf repo # NOTE: we use 'main', as the latest plugin version always lives there git clone -b main https://github.com/deployKF/deployKF.git ./deploykf # ensure the script is executable chmod +x ./deploykf/argocd-plugin/install_argocd.sh # run the install script # WARNING: this will install into your current kubectl context bash ./deploykf/argocd-plugin/install_argocd.sh ``` -------------------------------- ### Install deployKF CLI on macOS Source: https://www.deploykf.org/guides/deploykf-cli Downloads and installs the deployKF CLI for macOS. This script fetches the binary, places it in /usr/local/bin, and makes it executable. It handles different architectures (amd64/arm64). After installation, you can test it with 'deploykf version'. macOS security settings might require manual intervention. ```bash DKF_CLI_VERSION="0.1.2" DKF_CLI_ARCH=$(uname -m | sed -e 's/x86_64/amd64/') DFK_CLI_DEST=/usr/local/bin/deploykf # download the binary sudo curl -fL "https://github.com/deploykf/cli/releases/download/v${DKF_CLI_VERSION}/deploykf-darwin-${DKF_CLI_ARCH}" -o "${DFK_CLI_DEST}" # make the binary executable sudo chmod +x "${DFK_CLI_DEST}" # test the binary deploykf version ``` -------------------------------- ### Install Kubectx and Fzf Source: https://www.deploykf.org/guides/local-quickstart Installs kubectx and optionally fzf for managing kubectl contexts interactively. Kubectx simplifies switching between Kubernetes clusters, and fzf provides fuzzy-finder capabilities for a better user experience. ```bash # NOTE: the installing the 'fzf' package is optional, # it will make 'kubectx' interactive brew install kubectx fzf ``` -------------------------------- ### Download and Execute ArgoCD Sync Script Source: https://www.deploykf.org/guides/getting-started Downloads the `sync_argocd_apps.sh` script, makes it executable, and runs it to synchronize ArgoCD applications in the correct order. This is the recommended method for syncing deployKF applications. ```bash # download the latest version of the script curl -fL -o "sync_argocd_apps.sh" \ "https://raw.githubusercontent.com/deployKF/deployKF/main/scripts/sync_argocd_apps.sh" # ensure the script is executable chmod +x ./sync_argocd_apps.sh # ensure your kubectl context is set correctly kubectl config current-context # To run the script (example): # ./sync_argocd_apps.sh ``` -------------------------------- ### Install deployKF CLI on Windows Source: https://www.deploykf.org/guides/deploykf-cli Downloads and installs the deployKF CLI for Windows using PowerShell. This script fetches the Windows amd64 binary and saves it to C:\\Windows\\System32. You need to run this in an elevated PowerShell prompt. After installation, you can test it with 'deploykf version'. Windows security features might require manual approval. ```powershell $DKF_CLI_VERSION="0.1.2" $DFK_CLI_DEST="C:\\Windows\\System32\\deploykf.exe" # download the binary Invoke-WebRequest -Uri "https://github.com/deploykf/cli/releases/download/v${DKF_CLI_VERSION}/deploykf-windows-amd64.exe" -OutFile "${DFK_CLI_DEST}" # test the binary deploykf version ``` -------------------------------- ### Create MySQL Databases and User for DeployKF Source: https://www.deploykf.org/guides/external/mysql Example SQL commands to create the necessary databases (schemas) for Katib and Kubeflow Pipelines, along with a dedicated user ('kubeflow') with administrative privileges. It specifically sets the user's authentication plugin to `mysql_native_password` to ensure compatibility with Kubeflow Pipelines. ```sql -- create the databases CREATE DATABASE IF NOT EXISTS `katib`; CREATE DATABASE IF NOT EXISTS `kfp_cache`; CREATE DATABASE IF NOT EXISTS `kfp_metadata`; CREATE DATABASE IF NOT EXISTS `kfp_pipelines`; -- create the 'kubeflow' user (allowing access from any host) CREATE USER 'kubeflow'@'%' IDENTIFIED WITH mysql_native_password BY 'MY_PASSWORD'; -- grant access to the databases GRANT ALL PRIVILEGES ON `katib`.* TO 'kubeflow'@'%'; GRANT ALL PRIVILEGES ON `kfp_cache`.* TO 'kubeflow'@'%'; GRANT ALL PRIVILEGES ON `kfp_metadata`.* TO 'kubeflow'@'%'; GRANT ALL PRIVILEGES ON `kfp_pipelines`.* TO 'kubeflow'@'%'; ``` -------------------------------- ### Install Homebrew Dependencies Source: https://www.deploykf.org/guides/local-quickstart Installs essential tools such as Argo CD, jq, k3d, and kubectl using the Homebrew package manager. These are required for deploying and managing Kubernetes resources with DeployKF. ```bash brew install argocd jq k3d kubectl ``` -------------------------------- ### Generate Kubernetes Manifests with deployKF CLI Source: https://www.deploykf.org/guides/deploykf-cli Generates GitOps-ready Kubernetes manifests using the deployKF CLI. It takes a source version and a values file as input and outputs the manifests to a specified directory. Ensure the deployKF CLI is installed and accessible in your PATH. ```bash deploykf generate \ --source-version "0.1.5" \ --values ./custom-values.yaml \ --output-dir ./GENERATOR_OUTPUT ``` -------------------------------- ### Load Istio Kernel Modules Immediately Source: https://www.deploykf.org/guides/troubleshooting These commands load specific kernel modules required by Istio immediately without requiring a reboot. They also help verify if any modules are missing. ```bash sudo modprobe br_netfilter sudo modprobe ip_tables sudo modprobe iptable_filter sudo modprobe iptable_mangle sudo modprobe iptable_nat sudo modprobe iptable_raw sudo modprobe nf_nat sudo modprobe x_tables sudo modprobe xt_REDIRECT sudo modprobe xt_conntrack sudo modprobe xt_multiport sudo modprobe xt_owner sudo modprobe xt_tcpudp ``` -------------------------------- ### Download Generator Package with cURL Source: https://www.deploykf.org/guides/platform/offline This command downloads a specific version of the deployKF generator package from GitHub releases using cURL. Ensure you have cURL installed and replace the version number with the desired one. ```bash curl -fL -o "deploykf-0.1.5-generator.zip" \ "https://github.com/deployKF/deployKF/releases/download/v0.1.5/deploykf-0.1.5-generator.zip" ``` -------------------------------- ### Install k9s CLI Source: https://www.deploykf.org/guides/local-quickstart This command installs the k9s CLI tool, a powerful text-based UI for managing Kubernetes clusters. It can be installed using Homebrew on macOS and Linux systems. k9s simplifies pod status checking and cluster interaction. ```bash brew install k9s ``` -------------------------------- ### Load Istio Kernel Modules Source: https://www.deploykf.org/guides/getting-started Loads required kernel modules for Istio on Linux nodes. This includes configuring modules to load on boot and manually loading them using modprobe. Essential for Istio sidecar functionality and network stability. ```shell lsmod | awk '{print $1}' | sort ``` ```shell cat <> ~/.profile ``` -------------------------------- ### Generate Manifests with deployKF Source: https://www.deploykf.org/guides/getting-started Generates Kubernetes manifests using deployKF, merging multiple value files. Specify the source version, value files, and an output directory. Later value files take precedence during merging. ```bash deploykf generate \ --source-version "0.1.5" \ --values ./sample-values-0.1.5.yaml \ --values ./custom-overrides.yaml \ --output-dir ./GENERATOR_OUTPUT ``` -------------------------------- ### Create ClusterIssuer for Let's Encrypt (YAML) Source: https://www.deploykf.org/guides/platform/deploykf-gateway This YAML defines a ClusterIssuer resource for cert-manager, configured to use Let's Encrypt's ACME staging server. It specifies the DNS provider (Google Cloud DNS in this example) and the necessary details for domain verification using the DNS-01 challenge for wildcard and root domains. ```yaml apiVersion: cert-manager.io/v1 kind: ClusterIssuer metadata: name: my-cluster-issuer spec: acme: server: https://acme-staging-v02.api.letsencrypt.org/directory email: user@example.com privateKeySecretRef: name: letsencrypt-staging key: tls.key solvers: - dns01: cloudDNS: project: my-project-id serviceAccountSecretRef: name: my-service-account-secret key: service-account.json selector: dnsNames: - "*.deploykf.example.com" - "deploykf.example.com" ``` -------------------------------- ### Configure Istio Required Kernel Modules Source: https://www.deploykf.org/guides/troubleshooting This snippet configures the system to load essential kernel modules for Istio on boot. It creates a configuration file in /etc/modules-load.d/. If using Istio ambient mode, additional modules may be required. ```bash cat <