Skip to content

Commit

Permalink
Document how to use envSecretRefName to customize S3-like object store
Browse files Browse the repository at this point in the history
  • Loading branch information
phsiao committed Aug 12, 2019
1 parent 8898f5a commit 585e667
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions doc/source/servers/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,56 @@ spec:

The `modelUri` specifies the bucket containing the saved model, in this case `gs://seldon-models/sklearn/iris`.

`modeluri` supports the following three object storage providers:

* Google Cloud Storage (using `gs://`)
* S3-comptaible (using `s3://`)
* Azure Blob storage (using `https://(.+?).blob.core.windows.net/(.+)`)

When using S3-comptaible object storeage provider, you can provide access credential and custom endpoint by creating a `Secret` object:

```
apiVersion: v1
kind: Secret
metadata:
name: s3-secret
type: Opaque
data:
AWS_ACCESS_KEY_ID: XXXX
AWS_SECRET_ACCESS_KEY: XXXX
S3_ENDPOINT: XXXX
```

You can create a `Secret` object from command line by

```
kubectl create secret generic s3-secret --from-literal=S3_ENDPOINT='XXXX' --from-literal=AWS_ACCESS_KEY_ID='XXXX' --from-literal=AWS_SECRET_ACCESS_KEY='XXXX'
```

and you can [read more](https://kubernetes.io/docs/concepts/configuration/secret/) about interacting with `Secret` object.

And reference the `Secret` using `envSecretRefName` as shown below.

```
apiVersion: machinelearning.seldon.io/v1alpha2
kind: SeldonDeployment
metadata:
name: sklearn
spec:
name: iris
predictors:
- graph:
children: []
implementation: SKLEARN_SERVER
modelUri: s3://seldon-models/sklearn/iris
envSecretRefName: s3-secret
name: classifier
name: default
replicas: 1
```

Alternatively, you can also create a `ServiceAccount` and attach a differently formatted `Secret` to it similar to how kfserving does it. See kfserving documentation [on this topic](https://github.com/kubeflow/kfserving/tree/master/docs/samples/s3). Supported annotation prefix includes `serving.kubeflow.org` and `machinelearning.seldon.io`.

If you want to customize the resources for the server you can add a skeleton `Container` with the same name to your podSpecs, e.g.

```
Expand Down

0 comments on commit 585e667

Please sign in to comment.