Skip to content

Commit

Permalink
Create a notebook for mnist E2E on AWS (kubeflow#740)
Browse files Browse the repository at this point in the history
* Add method to get ALB hostname for aws users

* Revoke setup based on the platform

* Add AWS notebook for mnist e2e example

* Remove legacy kustomize manifests for mnist example

* Address feedbacks from reviewers
  • Loading branch information
Jeffwan authored Feb 21, 2020
1 parent 40f6ec8 commit 4c4f1c0
Show file tree
Hide file tree
Showing 15 changed files with 1,076 additions and 858 deletions.
389 changes: 33 additions & 356 deletions mnist/README.md

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions mnist/k8s_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,29 @@ def get_iap_endpoint():
raise

return f"https://{kf_ingress.spec.rules[0].host}"

## Use by AWS
def get_ingress_endpoint():
"""Return the URL of the Ingress endpoint"""
extensions = k8s_client.ExtensionsV1beta1Api()
kf_ingress = None

try:
kf_ingress = extensions.read_namespaced_ingress("istio-ingress", "istio-system")
except k8s_rest.ApiException as e:
if e.status == 403:
logging.warning(f"The service account doesn't have sufficient privileges "
f"to get the istio-system ingress. "
f"You will have to manually enter the Kubeflow endpoint. "
f"To make this function work ask someone with cluster "
f"priveleges to create an appropriate "
f"clusterrolebinding by running a command.\n"
f"kubectl create --namespace=istio-system rolebinding "
"--clusterrole=kubeflow-view "
"--serviceaccount=${NAMESPACE}:default-editor "
"${NAMESPACE}-istio-view")
return ""

raise

return f"http://{kf_ingress.status.load_balancer.ingress[0].hostname}"
Loading

0 comments on commit 4c4f1c0

Please sign in to comment.