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
npm install eks-blueprints-cdk-kubeflow-extThis 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/
Ensure that you have installed the following tools on your machine.
1. aws cli
2. kubectl
3. cdk
4. npm
Clone the repository
``sh`
git clone https://github.com/aws-samples/cdk-eks-blueprints-patterns.git
Create a CDK project, Bootstrap your environment and install dependency
`sh
cdk init app --language typescript
cdk bootstrap aws://
npm i @aws-quickstart/eks-blueprints
npm i eks-blueprints-cdk-kubeflow-ext
`
Replace the contents of bin/
`typescript`
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
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
`sh`
cdk deploy
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
`sh`
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/
To clean up your EKS Blueprints, run the following commands:
`sh``
cdk destroy --all