提交 d201cf04 编写于 作者: R Richard Liu 提交者: Kubernetes Prow Robot

Remove ksonnet references from "Other Guides" (#928)

* Update other guides

* Resolve

* Fix comments

* Fix typo
上级 199fdc89
+++
title = "Advanced Customizations"
description = "Customizing your deployment of Kubeflow"
weight = 100
+++
This guide has information about advanced customizations for Kubeflow.
## Persistent Disks
Frequently data scientists require a POSIX compliant filesystem. For example, most HDF5 libraries require POSIX and don't work with an object store like GCS or S3. Also, when working with teams you might want a shared POSIX filesystem to be mounted into your notebook environments so that data scientists can work collaboratively on the same datasets.
You can provision your own NFS shares and create Persistent Volume and Persistent Volume Claim objects and then attach them to your Jupyter notebook server via the disks flag.
Configure Jupyter to use the disks
```
ks param set jupyter disks ${PVC_CLAIM1},${PVC_CLAIM2}
```
Deploy the environment
```
ks apply cloud
```
Start Jupyter
You should see your NFS volumes mounted as `/mnt/${DISK_NAME}`
In a Jupyter cell you can run
```
!df
```
You should see output like the following
```
https://github.com/jlewi/deepvariant_on_k8s
Filesystem 1K-blocks Used Available Use% Mounted on
overlay 98884832 8336440 90532008 9% /
tmpfs 15444244 0 15444244 0% /dev
tmpfs 15444244 0 15444244 0% /sys/fs/cgroup
10.11.254.34:/export/pvc-d414c86a-e0db-11e7-a056-42010af00205 1055841280 77824 1002059776 1% /mnt/jlewi-kubeflow-test1
10.11.242.82:/export/pvc-33f0a5b3-e0dc-11e7-a056-42010af00205 1055841280 77824 1002059776 1% /mnt/jlewi-kubeflow-test2
/dev/sda1 98884832 8336440 90532008 9% /etc/hosts
shm 65536 0 65536 0% /dev/shm
tmpfs 15444244 0 15444244 0% /sys/firmware
```
* Here `jlewi-kubeflow-test1` and `jlewi-kubeflow-test2` are the names of the PVCs.
......@@ -54,7 +54,7 @@ If you encounter a jupyter-xxxx pod in Pending status, described with:
```
Warning FailedScheduling 8s (x22 over 5m) default-scheduler 0/1 nodes are available: 1 Insufficient memory.
```
* Then try recreating your Minikube cluster (and re-apply Kubeflow using ksonnet) with more resources (as your environment allows):
* Then try recreating your Minikube cluster (and re-apply Kubeflow using kustomize) with more resources (as your environment allows):
## RBAC clusters
......@@ -112,7 +112,7 @@ kubectl -n ${NAMESPACE} describe pods ${PODNAME}
## Pods stuck in Pending state
There are three pods that have Persistent Volume Claims (PVCs) that will get stuck in pending state if they are unable to bind their PVC. The three pods are minio, mysql, and vizier-db.
There are three pods that have Persistent Volume Claims (PVCs) that will get stuck in pending state if they are unable to bind their PVC. The three pods are minio, mysql, and katib-db.
Check the status of the PVC requests
```
......@@ -172,7 +172,6 @@ EOF
```
Once created the scheduler will successfully start the remaining three pods. The PVs may also be created prior to running any of the `kfctl.sh` commands.
## OpenShift
If you are deploying Kubeflow in an [OpenShift](https://github.com/openshift/origin) environment which encapsulates Kubernetes, you will need to adjust the security contexts for the ambassador and Jupyter-hub deployments in order to get the pods to run.
......@@ -188,55 +187,11 @@ You will also need to adjust the privileges of the tf-job-operator service accou
oc adm policy add-role-to-user cluster-admin -z tf-job-operator
```
## Docker for Mac
The [Docker for Mac](https://www.docker.com/docker-mac) Community Edition now ships with Kubernetes support (1.9.2) which can be enabled from their edge channel. If you decide to use this as your Kubernetes environment on Mac, you may encounter the following error when deploying Kubeflow:
```commandline
ks apply default
ERROR Attempting to deploy to environment 'default' at 'https://127.0.0.1:8443', but cannot locate a server at that address
```
This error is due to the fact that the default cluster installed by Docker for Mac is actually set to `https://localhost:6443`. One option is to directly edit the generated `environments/default/spec.json` file to set the "server" variable to the correct location, then retry the deployment. However, it is preferable to initialize your ksonnet app using the desired kube config:
```commandline
kubectl config use-context docker-for-desktop
ks init my-kubeflow
```
## 403 API rate limit exceeded error
Because ksonnet uses GitHub to pull kubeflow, unless user specifies GitHub API token, it will quickly consume maximum API call quota for anonymous.
Because kubectl uses GitHub to pull kubeflow, unless user specifies GitHub API token, it will quickly consume maximum API call quota for anonymous.
To fix this issue first create GitHub API token using this [guide](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/), and assign this token to GITHUB_TOKEN environment variable.
```commandline
export GITHUB_TOKEN=<< token >>
```
## ks apply produces error "Unknown variable: env"
Kubeflow requires a [specific version of ksonnet](/docs/started/requirements).
If you run `ks apply` with an older version of ksonnet you will likely get the error `Unknown variable: env` as illustrated below:
```shell
export KF_ENV=default
ks apply ${KF_ENV}
ERROR Error reading /Users/xxx/projects/devel/go/src/github.com/kubeflow/kubeflow/my-kubeflow/environments/nocloud/main.jsonnet: /Users/xxx/projects/devel/go/src/github.com/kubeflow/kubeflow/my-kubeflow/components/jupyterhub.jsonnet:8:49-52 Unknown variable: env
namespace: if params.namespace == "null" then env.namespace else params.namespace
```
You can check the ksonnet version as follows:
```shell
ks version
```
If your ksonnet version is lower than what is specified in the [requirements](/docs/started/requirements), please upgrade it and follow the [guide](/docs/components/ksonnet) to recreate the app.
## ksonnet on Windows
There are some known issues with ksonnet and Windows. You might consider
alternative solutions.
* construct base object: Failed to filter components ([kubeflow #481](https://github.com/kubeflow/kubeflow/issues/481))
* "ks apply" fails to correctly process paths in Windows shell ([ksonnet #382](https://github.com/ksonnet/ksonnet/issues/382))
......@@ -12,32 +12,27 @@ deployments.
Updating your deployment is a two step process:
1. Update your ksonnet application:
1. Update your kustomize manifests:
1. We recommend checking your app into source control to back it up before
1. We recommend checking your local packages into source control to back it up before
proceeding.
1. Use the script
[upgrade_ks_app.py](https://github.com/kubeflow/kubeflow/tree/{{< params "githubbranch" >}}/scripts)
to update your ksonnet app with the current version for the Kubeflow
packages.
1. Use `kfctl` to download the desired version of Kubeflow. For example:
Note: ksonnet is working on support for this capability.
See https://github.com/ksonnet/ksonnet/issues/237
```
export KUBEFLOW_VERSION={{% kf-latest-version %}}
export KFAPP="<the name of your Kubeflow application directory>"
kfctl init ${KFAPP} --version=${KUBEFLOW_VERSION} --package-manager=kustomize@${KUBEFLOW_VERSION}
```
Note that this will overwrite your previous manifest files.
1. Update the actual deployment:
1. Delete TFJobs v1alpha1 because Kubernetes can't deploy multiple versions of
a CRD:
```
kubectl delete crd tfjobs.kubeflow.org
```
1. Redeploy Kubeflow:
```
ks apply ${ENVIRONMENT} -c ${COMPONENT}
```
```
cd ${KFAPP}
kfctl generate all -V --zone ${ZONE}
kfctl apply -V all
```
## Upgrading or reinstalling Kubeflow Pipelines
......
......@@ -16,26 +16,27 @@ This command completely deletes any spartakus deployment, while the above
command only restarts spartakus with reportUsage set to `false`
```
ks delete default ${ENV} -c spartakus
kubectl -n ${NAMESPACE} delete deploy -l app=spartakus
ks component rm spartakus
```
**Reporting usage data is one of the most significant contributions you can make to Kubeflow; so please consider turning it on.** This data
allows us to improve the project and helps the many companies working on Kubeflow justify continued investment.
To explicitly enable usage reporting set reportUsage to `true`
You can improve the quality of the data by giving each Kubeflow deployment a unique id by editing `spartakus.yaml` in your `KF_APP` directory:
```
ks param set spartakus reportUsage true
# Delete any existing deployments of spartakus
kubectl delete -n ${NAMESPACE} deploy spartakus-volunteer
apiVersion: v1
data:
usageId: "your usage id"
kind: ConfigMap
metadata:
labels:
kustomize.component: spartakus
name: spartakus-parameters
namespace: kubeflow
```
**Reporting usage data is one of the most significant contributions you can make to Kubeflow; so please consider turning it on.** This data
allows us to improve the project and helps the many companies working on Kubeflow justify continued investment.
You can improve the quality of the data by giving each Kubeflow deployment a unique id
Then deploy your changes:
```
kubectl apply -f spartakus.yaml`
```
ks param set spartakus usageId $(uuidgen)
```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册