For people who wish to start using KubeFlow and Sagemaker operators for Kubernetes without spending any time on installation of underlying infrastructure and tools can use the CloudFormation in this git repo.
The scripts in this git repo are referenced from https://eksworkshop.com/ and https://sagemaker.readthedocs.io/en/stable/amazon_sagemaker_operators_for_kubernetes.html. Please check these links if you wish to see step by step process.
- Clone the git repo locally on your workstation and execute the Cloudformation template (we assume that you have already setup awscli)
aws cloudformation create-stack --stack-name demo --template-body file://cfv1.json --capabilities CAPABILITY_IAM --region us-east-1
You can also run the Cloudformation from AWS Console.
- The Cloudformation will run for about 20-25 minutes and will setup a) A Linux Jump Box with eksctl and kubectl b) EKS, KubeFlow and Sagemaker operators for k8s. c) install Cloud9 components
You can watch the installation process by logging into the Linux Jump Server (using EC2 instance connect) and tailing the log file at /var/log/cloud-init-output.log.
Go to Cloudformation service in AWS Console and check the stack which you just created-
Go to resources tab in the CF-
Select the WebServerInstance to go to the Linux Jump Box in EC2 console.
Hit Connect with EC2 Instance Connect. This will open SSH shell in browser. If you are not able to open EC2 instance connect for some reason you can also choose Session Manager. We are showing screenshots from EC2 instance connect.
Once connected to the Jump Box you can watch the installation of EKS, KubeFlow, Sagemaker operators and Cloud9 at /var/log/cloud-init-output.log
Wait for the installation to complete (should take approx 20-25 minutes). You will see below message at the end of bootstrapping.
- Connect to the Linux Jump Box from Cloud9 for accessing Kubeflow dashboard.
Open Cloud9 Console and create a new environment.
Give Name and Description-
In next screen choose, "Connect and run in remote server" and Enter Public DNS of the Linux Jump Server and Port as 22.
Before moving to next screen, we need to copy the Cloud9 public SSH key into our Linux jump server. Click on "Copy Key to Clipboard" and go SSH console of Linux Jump Server and update the file at /home/ec2-user/.ssh/authorized_keys.
Once the SSH key is copied to authorized_keys file, go back to the Cloud9 screen and complete creating the environment.
You should see Cloud9 console in a few moments.
From Cloud9 console, we can run eksctl and kubectl commands and also open Kubeflow dashboard.
On Cloud9, open a new terminal and run command-
kubectl port-forward svc/istio-ingressgateway -n istio-system 8080:80
Keep this command running and continue your work in other tabs/terminal within Cloud9
You can open KubeFlow dashboard by selecting Preview --> Preview running applications.
- eksctl delete cluster
- Delete IAM OIDC
- Delete IAM Roles.
- Delete/Disable the AWS KMS Custom Key (optional)
- Delete the Cloudformation templates . There will be total three templates ( 2 from eksctl and 1 which you created at the beginning of the lab).
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.