Skip to content

Commit ca09f1f

Browse files
Jeffwank8s-ci-robot
authored andcommitted
Update aws docs for 0.6 release (#1030)
* Update aws docs for 0.6 release * Address code review feedbacks * Update indents to render markdown * Remove shell in code blocks * Fix indent issue * Make existing cluster solution more clear
1 parent d09cecc commit ca09f1f

File tree

4 files changed

+127
-120
lines changed

4 files changed

+127
-120
lines changed

content/docs/aws/authentication.md

+16-9
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ This section shows the how to add TLS support and create a user pool to authenti
88

99

1010
## Traffic Flow
11-
External Traffic → [ Ingress → Istio ingress gateway → ambassador ]
11+
External Traffic → [ Ingress → Istio ingress gateway → Istio virtual services ]
1212

1313
When you generate and apply kubernetes resources, an ingress is created to manage external traffic to Kubernetes services. The AWS Appliction Load Balancer(ALB) Ingress Controller will provision an Application Load balancer for that ingress. By default, TLS and authentication are not enabled at creation time.
1414

15-
The Kubeflow community plans to move from [Ambassador](https://www.getambassador.io/) to [Istio](https://istio.io/) to manage internal traffic (see [this issue](https://github.com/kubeflow/kubeflow/issues/2261)). Currently, [Ambassador](https://www.getambassador.io/) still plays the role of an API gateway. TLS, authentication, and authorization either can be done at the ALB or Istio layer for the AWS platform, and we plan to have Istio forward ingress traffic to the Istio gateway and then on to Ambassador when this happens. Once receive a clear direction from the community, we will enable TLS and authentication by default.
15+
In Kubeflow 0.6 release, community already move from [Ambassador](https://www.getambassador.io/) to [Istio](https://istio.io/) to manage internal traffic. In AWS solution, TLS, authentication,can be done at the ALB and and authorization can be done at Istio layer.
1616

1717

1818
## Enable TLS and Authentication
@@ -39,17 +39,24 @@ To get TLS support from the ALB Ingress Controller, you need to follow [this tut
3939

4040
In order to authenticate and manage users for Kubeflow, let's create a user pool. You can follow these instructions here. Once a user pool created, we will have a `UserPoolId`, a Cognito Domain name, and a Cognito Pool Arn.
4141

42-
Before you apply k8s, you can go into ${KUBEFLOW_SRC}/${KFAPP}/ks_app,
42+
Before you `generate all -V`, please update Cognito spec in `app.yaml` like this,
4343

4444
```
45-
ks param set istio-ingress CognitoUserPoolArn arn:aws:cognito-idp:us-west-2:xxx:userpool/xxx
46-
ks param set istio-ingress CognitoAppClientId xxxxxx
47-
ks param set istio-ingress CognitoUserPoolDomain xxxx
48-
ks param set istio-ingress enableCognito true
49-
ks param set istio-ingress certArn arn:aws:acm:us-west-2:xxx:certificate/xxxe4031c
45+
plugins:
46+
- name: aws
47+
spec:
48+
auth:
49+
cognito:
50+
cognitoUserPoolArn: arn:aws:cognito-idp:us-west-2:xxxxx:userpool/us-west-2_xxxxxx
51+
cognitoAppClientId: xxxxxbxxxxxx
52+
cognitoUserPoolDomain: your-user-pool
53+
certArn: arn:aws:acm:us-west-2:xxxxx:certificate/xxxxxxxxxxxxx-xxxx
54+
roles:
55+
- eksctl-kubeflow-aws-nodegroup-ng-a2-NodeInstanceRole-xxxxx
56+
region: us-west-2
5057
```
5158

52-
After you finish the TLS and Authentication configuration, then you can run `${KUBEFLOW_SRC}/${KFAPP}/scripts/kfctl.sh apply k8s`.
59+
After you finish the TLS and Authentication configuration, then you can run `kfctl generate all -V`.
5360

5461
After your ingress DNS is ready, you need to create a `CNAME` in your DNS records.
5562

content/docs/aws/deploy/existing-cluster.md

+29-13
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,26 @@ This is one step of [installing Kubeflow](/docs/aws/deploy/install-kubeflow), pl
99

1010
### Deploy Kubeflow on existing Amazon EKS Cluster
1111

12-
If you would like to deploy Kubeflow on existing Amazon EKS cluster, the only difference in setup is when you initialize the platform setup. Since you manage your own cluster resources, you need to provide `AWS_CLUSTER_NAME` and `AWS_NODEGROUP_ROLE_NAMES`.
12+
If you would like to deploy Kubeflow on existing Amazon EKS cluster, the only difference in setup is when you initialize the platform setup. Since you manage your own cluster resources, you need to provide `AWS_CLUSTER_NAME`, `cluster region` and `worker roles`.
1313

14+
1. Download `kfctl` binary and config file
15+
16+
```shell
17+
# Add kfctl to PATH, to make the kfctl binary easier to use.
18+
tar -xvf kfctl_<release tag>_<platform>.tar.gz
19+
export PATH=$PATH:"<path to kfctl>"
20+
21+
# Download config files
22+
export CONFIG="/tmp/kfctl_aws.yaml"
23+
wget https://raw.githubusercontent.com/kubeflow/kubeflow/master/bootstrap/config/kfctl_aws.yaml -O ${CONFIG}
24+
```
1425

15-
1. Retrieve the Amazon EKS cluster name, AWS Region, and IAM role name for your worker nodes. Set these values to the following environment variables.
26+
27+
1. Retrieve the Amazon EKS cluster name, AWS Region, and IAM role name for your worker nodes. Set these values in the manifest file.
1628

1729
```shell
18-
export KFAPP=kfapp
19-
export REGION=<YOUR EKS CLUSTER REGION>
2030
export AWS_CLUSTER_NAME=<YOUR EKS CLUSTER NAME>
21-
export AWS_NODEGROUP_ROLE_NAMES=<YOUR NODE GROUP ROLE NAMES>
31+
export KFAPP=${AWS_CLUSTER_NAME}
2232
```
2333

2434
> Note: To get your Amazon EKS worker node IAM role name, you can check IAM setting by running the following commands. This command assumes that you used `eksctl` to create your cluster. If you use other provisioning tools to create your worker node groups, please find the role that is associated with your worker nodes in the Amazon EC2 console.
@@ -33,15 +43,21 @@ If you would like to deploy Kubeflow on existing Amazon EKS cluster, the only di
3343
eksctl-kubeflow-example-nodegroup-ng-185-NodeInstanceRole-1DDJJXQBG9EM6
3444
```
3545

36-
If you have multiple node groups, you will see corresponding number of node group roles. In that case, please provide the role names as a comma-separated list.
46+
Change cluster region and worker roles names in your `kfctl_aws.yaml`
47+
```yaml
48+
region: us-west-2
49+
roles:
50+
- eksctl-kubeflow-example-nodegroup-ng-185-NodeInstanceRole-1DDJJXQBG9EM6
51+
```
52+
> If you have multiple node groups, you will see corresponding number of node group roles. In that case, please provide the role names as an array.
3753

38-
1. Initial setup
54+
1. Install Kubeflow
3955

4056
```shell
41-
cd ${KUBEFLOW_SRC}
42-
43-
${KUBEFLOW_SRC}/scripts/kfctl.sh init ${KFAPP} --platform aws \
44-
--awsClusterName ${AWS_CLUSTER_NAME} \
45-
--awsRegion ${REGION} \
46-
--awsNodegroupRoleNames ${AWS_NODEGROUP_ROLE_NAMES}
57+
kfctl init ${KFAPP} --config=${CONFIG} -V
58+
cd ${KFAPP}
59+
kfctl generate all -v
60+
kfctl apply all -v
4761
```
62+
63+
All rest steps are exact same for both install kubeflow on new cluster and existing cluster. Please come back to [Installing Kubeflow](/docs/aws/deploy/install-kubeflow) to finish post installation step.

content/docs/aws/deploy/install-kubeflow.md

+79-91
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@ description = "Instructions for deploying Kubeflow with the shell"
44
weight = 4
55
+++
66

7-
This guide describes how to use the `kfctl.sh` script to
7+
This guide describes how to use the `kfctl` golang cli to
88
deploy Kubeflow on Amazon Web Services (AWS).
99

10-
> Note: Amazon Web Services (AWS) is moving from `kfctl.sh` to a command line interface (CLI) which gives you more control over your configuration and better reliability. It's under development and will be released around end of June.
11-
12-
1310
## Prerequisites
1411

1512
* Install [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl)
@@ -19,136 +16,127 @@ deploy Kubeflow on Amazon Web Services (AWS).
1916
* Enter your Access Keys ([Access Key ID and Secret Access Key](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys)).
2017
* Enter your preferred AWS Region and default output options.
2118
* Install [eksctl](https://github.com/weaveworks/eksctl) (version 0.1.31 or newer) and the [aws-iam-authenticator](https://docs.aws.amazon.com/eks/latest/userguide/install-aws-iam-authenticator.html).
22-
* Install [jq](https://stedolan.github.io/jq/download/).
2319

2420
You do not need to have an existing Amazon Elastic Container Service for Kubernetes (Amazon EKS) cluster. The deployment process will create a cluster for you.
2521

2622
The installation tool uses the `eksctl` command and doesn't support the `--profile` option in that command.
2723
If you need to switch role, use the `aws sts assume-role` commands. See the AWS guide to [using temporary security credentials to request access to AWS resources](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html).
2824

2925

30-
## Understanding the deployment process
31-
32-
The deployment process is controlled by 4 different commands:
26+
## Kubeflow installation
3327

34-
* **init** - The initial one-time set up.
35-
* **generate** - Creates the configuration files that define your various resources.
36-
* **apply** - Creates or updates the resources.
37-
* **delete** - Deletes the resources.
28+
1. Download the latest `kfctl` golang binary from [Kubeflow release page](https://github.com/kubeflow/kubeflow/releases) and unpack it.
3829

39-
With the exception of `init`, all commands take an argument which describes the set of resources to apply the command to; this argument can be one of the following:
30+
```
31+
# Add kfctl to PATH, to make the kfctl binary easier to use.
32+
tar -xvf kfctl_<release tag>_<platform>.tar.gz
33+
export PATH=$PATH:"<path to kfctl>"
34+
```
4035
41-
* **platform** - All AWS resources; that is, anything that doesn’t run on Kubernetes. Like IAM policy attachments, Amazon EKS cluster creation, etc.
42-
* **k8s** - All Kubernetes resources. Such as Kubeflow packages and add-on packages like `fluentd` or `istio`.
43-
* **all** - Both AWS and Kubernetes resources.
36+
1. Download manifest and config setups
4437
45-
### App layout
38+
```shell
39+
# Download config files
40+
export CONFIG="/tmp/kfctl_aws.yaml"
41+
wget https://raw.githubusercontent.com/kubeflow/kubeflow/master/bootstrap/config/kfctl_aws.yaml -O ${CONFIG}
42+
```
4643
47-
Your Kubeflow `app` directory contains the following files and directories:
44+
* `kfctl_aws.yaml` is one of setup manifests, please check [kfctl_aws_cognito.yaml](https://github.com/kubeflow/kubeflow/blob/master/bootstrap/config/kfctl_aws_cognito.yaml) for the template to enable authentication.
4845
49-
* **app.yaml** - Defines the configuration related to your Kubeflow deployment.
50-
* These values are set when you run `kfctl init`.
51-
* These values are snapshotted inside `app.yaml` to make your app self contained.
52-
* **${KFAPP}/aws_config** - A directory that contains a sample `eksctl` cluster configuration file that defines the AWS cluster and policy files to attach to your node group roles.
53-
* This directory is created when you run `kfctl.sh generate platform`.
54-
* You can modify the `cluster_config.yaml` and `cluster_features.sh` files to customize your AWS infrastructure.
55-
* **${KFAPP}/k8s_specs** - A directory that contains YAML specifications for daemons deployed on your Kubernetes Engine cluster.
56-
* **kustomize** is a directory that contains the kustomize packages for Kubeflow applications.
57-
* The directory is created when you run `kfctl generate`.
58-
* You can customize the Kubernetes resources (modify the manifests and run `kfctl apply` again).
46+
- If you plan to use `kfctl` to create a new eks cluster, please remove follow lines in the manifest file.
47+
- If you want to install on existing EKS cluster, please change roles to your worker node group roles. See [existing cluster](/docs/aws/deploy/existing-cluster) for details.
5948
60-
The provisioning scripts can either bring up a new cluster and install Kubeflow on it, or you can install Kubeflow on your existing cluster. We recommend that you create a new cluster for better isolation.
49+
```shell
50+
roles:
51+
- eksctl-kubeflow-aws-nodegroup-ng-a2-NodeInstanceRole-xxxxxxx
52+
```
6153
62-
If you experience any issues running these scripts, see the [troubleshooting guidance](/docs/aws/troubleshooting-aws) for more information.
54+
1. Run the following commands to set up your environment and initialize the cluster.
6355
56+
Since there're many ways to create your cluster, we highly recommend you to get our own eks cluster ready.
6457
65-
## Kubeflow installation
58+
Note: If you would like to install Kubeflow on your existing EKS cluster,
59+
please skip this step and follow the setup instructions for an [existing cluster](/docs/aws/deploy/existing-cluster) instead.
6660
67-
1. Run the following commands to download the latest `kfctl.sh`
61+
```
62+
export KFAPP=kfaws
6863
69-
```shell
70-
export KUBEFLOW_SRC=/tmp/kubeflow-aws
71-
export KUBEFLOW_TAG=v0.5-branch
64+
kfctl init ${KFAPP} --config=${CONFIG} -V
65+
cd ${KFAPP}
7266
73-
mkdir -p ${KUBEFLOW_SRC} && cd ${KUBEFLOW_SRC}
74-
curl https://raw.githubusercontent.com/kubeflow/kubeflow/${KUBEFLOW_TAG}/scripts/download.sh | bash
67+
kfctl generate all -V
68+
kfctl apply all -V
7569
```
7670
77-
* KUBEFLOW_SRC - Full path to your preferred download directory. Please use the full absolute path, for example `/tmp/kubeflow-aws`
71+
* KFAPP - Use a relative directory name here rather than absolute path, such as `kfapp`. It will be used as eks cluster name.
72+
* CONFIG - Path to the configuration file
7873
79-
1. Run the following commands to set up your environment and initialize the cluster.
8074
81-
> Note: If you would like to install Kubeflow on your existing EKS cluster, please skip this step
82-
> and follow the setup instructions for an [existing cluster](/docs/aws/deploy/existing-cluster) instead.
83-
> When you are finished, return here and resume with the next step.
75+
*Important!!!* By default, these scripts create an AWS Application Load Balancer for Kubeflow that is open to public. This is good for development testing and for short term use, but we do not recommend that you use this configuration for production workloads.
8476
77+
To secure your installation, Follow the [instructions](/docs/aws/authentication) to add authentication.
8578
86-
```shell
87-
export KFAPP=kfapp
88-
export REGION=us-west-2
89-
export AWS_CLUSTER_NAME=kubeflow-aws
9079
91-
${KUBEFLOW_SRC}/scripts/kfctl.sh init ${KFAPP} --platform aws \
92-
--awsClusterName ${AWS_CLUSTER_NAME} \
93-
--awsRegion ${REGION}
80+
1. Wait for all the resources to become ready in the `kubeflow` namespace.
81+
```
82+
kubectl -n kubeflow get all
9483
```
9584
85+
1. Get Kubeflow service endpoint and copy link in browser.
9686
97-
* AWS_CLUSTER_NAME - Specify a unique name for your Amazon EKS cluster.
98-
* KFAPP - Use a relative directory name here rather than absolute path, such as `kfapp`.
99-
* REGION - Use the AWS Region you want to create your cluster in.
100-
101-
1. Generate and apply platform changes.
102-
103-
You can customize your cluster configuration, control plane logging, and private cluster endpoint access before you `apply platform`, please see [Customizing Kubeflow on AWS](/docs/aws/customizing-aws) for more information.
87+
```
88+
kubectl get ingress -n istio-system
10489
105-
```shell
106-
cd ${KFAPP}
107-
${KUBEFLOW_SRC}/scripts/kfctl.sh generate platform
108-
# Customize your Amazon EKS cluster configuration before following the next step
109-
${KUBEFLOW_SRC}/scripts/kfctl.sh apply platform
90+
NAMESPACE NAME HOSTS ADDRESS PORTS AGE
91+
istio-system istio-ingress * a743484b-istiosystem-istio-2af2-xxxxxx.us-west-2.elb.amazonaws.com 80 1h
11092
```
11193
112-
> Note: If you see `no kind "ClusterConfig" is registered for version "eksctl.io/v1alpha5"` error, it means your eksctl version is low and not compatible with latest version. Please upgrade it and have another try.
94+
This deployment may take 3-5 minutes to become ready. Verify that the address works by opening it in your preferred Internet browser. You can also run `kubectl delete istio-ingress -n istio-system` to remove the load balancer entirely.
11395
114-
1. Generate and apply the Kubernetes changes.
96+
## Post Installation
11597
116-
```shell
117-
${KUBEFLOW_SRC}/scripts/kfctl.sh generate k8s
118-
```
98+
Kubeflow 0.6 release brings multi-tenancy support and user are not able to create notebooks in `kubeflow`, `default` namespace. Instead, please create a `Profile` using `kubectl apply -f profile.yaml` and profile controller will create new namespace and service account which is allowed to create notebook in that namespace.
11999
120-
__*Important!!!*__ By default, these scripts create an AWS Application Load Balancer for Kubeflow that is open to public. This is good for development testing and for short term use, but we do not recommend that you use this configuration for production workloads.
100+
```yaml
101+
apiVersion: kubeflow.org/v1alpha1
102+
kind: Profile
103+
metadata:
104+
name: aws-sample-user
105+
spec:
106+
owner:
107+
kind: User
108+
name: aws-sample-user
109+
```
121110

122-
To secure your installation, you have two options:
123-
124-
* Disable ingress before you `apply k8s`. Open `${KUBEFLOW_SRC}/${KFAPP}/env.sh` and edit the `KUBEFLOW_COMPONENTS` environment variable. Delete `,\"alb-ingress-controller\",\"istio-ingress\"` and save the file.
111+
## Understanding the deployment process
125112

126-
* Follow the [instructions](/docs/aws/authentication) to add authentication before you `apply k8s`
113+
The deployment process is controlled by 4 different commands:
127114

128-
Once your customization is done, you can run this command to deploy Kubeflow.
129-
```shell
130-
${KUBEFLOW_SRC}/scripts/kfctl.sh apply k8s
131-
```
115+
* **init** - The initial one-time set up.
116+
* **generate** - Creates the configuration files that define your various resources.
117+
* **apply** - Creates or updates the resources.
118+
* **delete** - Deletes the resources.
132119

133-
1. Wait for all the resources to become ready in the `kubeflow` namespace.
134-
```
135-
kubectl -n kubeflow get all
136-
```
120+
With the exception of `init`, all commands take an argument which describes the set of resources to apply the command to; this argument can be one of the following:
137121

138-
1. Open Kubeflow Dashboard
139-
* If you chose to use a load balancer, you can retrieve the public DNS name here.
122+
* **platform** - All AWS resources; that is, anything that doesn’t run on Kubernetes. Like IAM policy attachments, Amazon EKS cluster creation, etc.
123+
* **k8s** - All Kubernetes resources. Such as Kubeflow packages and add-on packages like `fluentd` or `istio`.
124+
* **all** - Both AWS and Kubernetes resources.
140125

141-
```shell
142-
kubectl get ingress -n istio-system
126+
### App layout
143127

144-
NAMESPACE NAME HOSTS ADDRESS PORTS AGE
145-
istio-system istio-ingress * a743484b-istiosystem-istio-2af2-xxxxxx.us-west-2.elb.amazonaws.com 80 1h
146-
```
128+
Your Kubeflow `app` directory contains the following files and directories:
147129

148-
This deployment may take 3-5 minutes to become ready. Verify that the address works by opening it in your preferred Internet browser. You can also run `kubectl delete istio-ingress -n istio-system` to remove the load balancer entirely.
130+
* **app.yaml** - Defines the configuration related to your Kubeflow deployment.
131+
* These values are set when you run `kfctl init`.
132+
* These values are snapshotted inside `app.yaml` to make your app self contained.
133+
* **${KFAPP}/aws_config** - A directory that contains a sample `eksctl` cluster configuration file that defines the AWS cluster and policy files to attach to your node group roles.
134+
* This directory is created when you run `kfctl generate platform -V`.
135+
* You can modify the `cluster_config.yaml` and `cluster_features.yaml` files to customize your AWS infrastructure.
136+
* **kustomize** is a directory that contains the kustomize packages for Kubeflow applications.
137+
* The directory is created when you run `kfctl generate`.
138+
* You can customize the Kubernetes resources (modify the manifests and run `kfctl apply` again).
149139

150-
* If you didn't create a load balancer, please use port-forwarding to visit your cluster. Run following command and visit `localhost:8080`.
140+
The provisioning scripts can either bring up a new cluster and install Kubeflow on it, or you can install Kubeflow on your existing cluster. We recommend that you create a new cluster for better isolation.
151141

152-
```shell
153-
kubectl port-forward -n kubeflow `kubectl get pods -n kubeflow --selector=service=ambassador -o jsonpath='{.items[0].metadata.name}'` 8080:80
154-
```
142+
If you experience any issues running these scripts, see the [troubleshooting guidance](/docs/aws/troubleshooting-aws) for more information.

0 commit comments

Comments
 (0)