Submit Kubernetes Resources
Submitting Kubernetes resources from a Jupyter notebook
Out of date
This guide contains outdated information pertaining to Kubeflow 1.0. This guide needs to be updated for Kubeflow 1.1.
Kubeflow assigns the default-editor
service account to the Jupyter notebook Pods. This service account is bound to the kubeflow-edit
ClusterRole, which has namespace-scoped permissions to the many Kubernetes resources including:
- Pods
- Deployments
- Services
- Jobs
- TFJobs
- PyTorchJobs
You can get a full list of these permissions using:
kubectl describe clusterrole kubeflow-edit
You can therefore create the above Kubernetes resources directly from your Jupyter notebook in Kubeflow. The Kubernetes kubectl
command-line tool is pre-installed in the notebook.
Run the following command in a Jupyter notebook cell to create Kubernetes resources:
!kubectl create -f myspec.yaml
The myspec.yaml
file should describe one of the above Kubernetes resources. For information about the format of the YAML file, see the Kubernetes object guide.
Next steps
- See the guide to setting up your Jupyter notebooks in Kubeflow.
- Explore the components of Kubeflow, including custom Kubernetes resources.
Last modified 03.08.2020: Added outdated banner to non-index docs unchanged in last 30d (#2072) (e56f3650)