Install on EKS¶
This guide describes how to install Charmed Kubeflow (CKF) on AWS Elastic Kubernetes Service (EKS).
You will spin up an EKS cluster on AWS cloud using the Amazon EKS Command Line Interface (CLI), eksctl, on your local machine. Then, you will interact with the cluster and deploy CKF using kubectl and Juju.
Requirements¶
Local machine with Ubuntu 22.04 or later.
An AWS account.
kubectl
.
Important
If you use IAM credentials for eksctl authentication, make sure they meet these minimum IAM policies.
Deploy EKS cluster¶
First, clone the following repository containing the YAML file used to create the EKS cluster:
git clone https://github.com/canonical/kubeflow-examples.git
cd kubeflow-examples/eks-cluster-setup
Configure the deployment through the YAML file. The configuration set in the YAML file above provides the minimum requirements for deploying CKF:
region
: the cluster is deployed by default toeu-central-1
zone. Editmetadata.region
andavailabilityZones
according to your needs.ssh key
: editmanagedNodeGroups[0].ssh.publicKeyName
with your key pair name to enable SSH access into the new EC2 instances.instance type
: the cluster is deployed with EC2 instances of typet2.2xlarge
for worker nodes, according to themanagedNodeGroups[0].instanceType
field. See Instance types for more information.k8s version
: the cluster uses Kubernetes (K8s) 1.24 by default. See Supported versions for more details about compatibility between CKF, K8s and Juju.worker nodes
: the cluster has two worker nodes. EditmaxSize
andminSize
undermanagedNodeGroups[0]
according to your needs.volume size
: each worker node has gp2/gp3 disk of size 100 Gb. EditmanagedNodeGroups[0].volumeSize
for a different configuration.
You can now deploy the cluster as follows:
eksctl create cluster -f cluster.yaml
Note
The deployment may take up to 20 minutes.
Warning
The deployment incurs charges for every hour the cluster is running.
Verify access to the cluster¶
Check the access to the cluster as follows:
kubectl get nodes
Note
See Creating a kubeconfig file in case the command above does not return the expected node output.
Set up Juju¶
Install Juju:
sudo snap install juju --channel=3.4/stable
Add your EKS cluster as a cloud to Juju:
/snap/juju/current/bin/juju add-k8s eks --client
Bootstrap a Juju controller:
/snap/juju/current/bin/juju bootstrap eks eks-controller
Note
The command /snap/juju/current/bin/juju
is currently used as a workaround for a bug.
See Get started with Juju for more details.
Deploy CKF¶
To deploy CKF and access its dashboard, follow the steps provided in the general installation guide from creating the kubeflow
model section.
Clean up resources¶
See Delete a cluster for information about removing the EKS cluster and related resources.
Warning
The procedure above does not always delete the volumes that have been created during the cluster deployment. In that case, you can delete them manually.
To clean up Juju resources, run the following commands:
juju unregister eks-controller
juju remove-cloud eks --client