eks-blueprints-cdk-kubeflow-ext
v0.1.9
Published
This module is a kubeflow extension for https://github.com/aws-quickstart/cdk-eks-blueprints. # Kubeflow on EKS The Kubeflow project is dedicated to making deployments of machine learning (ML) workflows on Kubernetes simple, portable and scalable. Our goa
Downloads
53
Readme
eks-blueprints-cdk-kubeflow-extension
This module is a kubeflow extension for https://github.com/aws-quickstart/cdk-eks-blueprints.
Kubeflow on EKS
The Kubeflow project is dedicated to making deployments of machine learning (ML) workflows on Kubernetes simple, portable and scalable. Our goal is not to recreate other services, but to provide a straightforward way to deploy best-of-breed open-source systems for ML to diverse infrastructures. Anywhere you are running Kubernetes, you should be able to run Kubeflow.
This example deploys the following resources
- Creates EKS Cluster Control plane with public endpoint (for demo purpose only) with a managed node group
- Deploys supporting add-ons: ClusterAutoScaler, AwsLoadBalancerController, VpcCni, CoreDns, KubeProxy, EbsCsiDriver
- Deploy Kubeflow on the EKS cluster
Note: we use EKS 1.21 here which is the latest EKS version supported by Kubeflow. see reference below https://awslabs.github.io/kubeflow-manifests/docs/about/eks-compatibility/
Prerequisites:
Ensure that you have installed the following tools on your machine.
Deploy EKS Cluster with Amazon EKS Blueprints for CDK
Clone the repository
git clone https://github.com/aws-samples/cdk-eks-blueprints-patterns.git
Create a CDK project, Bootstrap your environment and install dependency
cdk init app --language typescript
cdk bootstrap aws://<AWS_ACCOUNT_ID>/<AWS_REGION>
npm i @aws-quickstart/eks-blueprints
npm i eks-blueprints-cdk-kubeflow-ext
Replace the contents of bin/.ts with the following:
import 'source-map-support/register';
import * as cdk from 'aws-cdk-lib';
import * as blueprints from '@aws-quickstart/eks-blueprints';
import * as KubeflowAddOn from 'eks-blueprints-cdk-kubeflow-ext';
const app = new cdk.App();
// AddOns for the cluster.
const addOns: Array<blueprints.ClusterAddOn> = [
new blueprints.addons.MetricsServerAddOn,
new blueprints.addons.ClusterAutoScalerAddOn,
new blueprints.addons.AwsLoadBalancerControllerAddOn(),
new blueprints.addons.VpcCniAddOn(),
new blueprints.addons.CoreDnsAddOn(),
new blueprints.addons.KubeProxyAddOn(),
new blueprints.addons.EbsCsiDriverAddOn(),
new KubeflowAddOn({
namespace: 'kubeflow-pipelines'
})
];
const account = 'XXXXXXXXXXXXX'
const region = 'your region'
const props = { env: { account, region } }
new blueprints.EksBlueprint(app, { id: 'kubeflow-eks', addOns}, props)
Deploy the stack using the following command
cdk deploy
Verify the resources
Let’s verify the resources created by Steps above.
kubectl get nodes # Output shows the EKS Managed Node group nodes
kubectl get ns | kubeflow # Output shows kubeflow namespace
kubectl get pods --namespace=kubeflow-pipelines # Output shows kubeflow pods
Execute Machine learning jobs on Kubeflow
log into Kubeflow pipeline UI by creating a port-forward to the ml-pipeline-ui service
kubectl port-forward svc/ml-pipeline-ui 9000:80 -n =kubeflow-pipelines
and open this browser: http://localhost:9000/#/pipelines more pipeline examples can be found at https://www.kubeflow.org/docs/components/pipelines/tutorials/
Cleanup
To clean up your EKS Blueprints, run the following commands:
cdk destroy --all