Skip to content

Commit

Permalink
docs: release notes & updates for Kubernetes pods to jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinaecalderon committed May 29, 2024
1 parent 66f9d1e commit 44c279a
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 26 deletions.
10 changes: 10 additions & 0 deletions docs/release-notes/pods-to-jobs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
:orphan:

**New Features**

- Kubernetes: When users submit Determined tasks, the system now launch Kubernetes jobs on their
behalf of instead of Kubernetes pods. The new system interacts differently with other Kubernetes
concepts; e.g., Determined tasks will now work properly with Kubernetes resources quotas.

Because of this, we now require permissions to create, get, list, delete and watch Kubernetes
jobs resources.
19 changes: 3 additions & 16 deletions docs/setup-cluster/k8s/_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ Determined master and a Postgres database in the Kubernetes cluster. Once the ma
running, you can launch :ref:`experiments <experiments>`, :ref:`notebooks <notebooks>`,
:ref:`TensorBoards <tensorboards>`, :ref:`commands <commands-and-shells>`, and :ref:`shells
<commands-and-shells>`. When new workloads are submitted to the Determined master, the master
launches pods and configMaps on the Kubernetes cluster to execute those workloads. Users of
launches jobs and config maps on the Kubernetes cluster to execute those workloads. Users of
Determined shouldn't need to interact with Kubernetes directly after installation, as Determined
handles all the necessary interaction with the Kubernetes cluster.
handles all the necessary interaction with the Kubernetes cluster. Kubernetes creates and cleans up
pods for all jobs that Determined may request.

It is also important to note that when running Determined on Kubernetes, a higher priority value
means a higher priority (e.g. a priority 50 task will run before a priority 40 task). This is
Expand Down Expand Up @@ -138,20 +139,6 @@ for diagnosing any issues that arise during installation.
# Get logs for the pod running the Determined master.
kubectl logs <determined-master-pod-name>
Get All Running Task Pods
=========================

These ``kubectl`` commands list and delete pods which are running Determined tasks:

.. code:: bash
# Get all pods that are running Determined tasks.
kubectl get pods -l=determined
# Delete all Determined task pods. Users should never have to run this,
# unless they are removing a deployment of Determined.
kubectl get pods --no-headers=true -l=determined | awk '{print $1}' | xargs kubectl delete pod
.. toctree::
:maxdepth: 1
:hidden:
Expand Down
4 changes: 2 additions & 2 deletions docs/setup-cluster/k8s/custom-pod-specs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#################

In a :ref:`Determined cluster running on Kubernetes <determined-on-kubernetes>`, tasks (e.g.,
experiments, notebooks) are executed by launching one or more Kubernetes pods. You can customize
these pods by providing custom `pod specs
experiments, notebooks) are executed by launching a Kubernetes job. These jobs launch one or more
Kubernetes pods. You can customize these pods by providing custom `pod specs
<https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#pod-v1-core>`__. Common use
cases include assigning pods to specific nodes, specifying additional volume mounts, and attaching
permissions. Configuring pod specs is not required to use Determined on Kubernetes.
Expand Down
27 changes: 19 additions & 8 deletions docs/setup-cluster/k8s/helm-commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,31 @@ for diagnosing any issues that arise during installation.
# Get logs for the pod running the Determined master.
kubectl logs <determined-master-pod-name>
***************************
Get All Running Task Pods
***************************
*********************************************
Get All Determined-launched Kubernetes Jobs
*********************************************

These ``kubectl`` commands list and delete pods which are running Determined tasks:
On Determined with Kubernetes, tasks start their own jobs, which have associated pods. These
``kubectl`` commands list and delete pods which are running Determined tasks:

.. code:: bash
# Get all pods that are running Determined tasks.
kubectl get pods -l=determined
# Get all jobs that are running Determined tasks.
kubectl get jobs -l=determined
# Get all pods associated with a given job.
kubectl get pods -l="batch.kubernetes.io/job-name=<determined-job-name>"
# Delete all Determined task pods. Users should never have to run this,
# Delete all Determined jobs for all tasks for ALL clusters. Users should never have to run this,
# unless they are removing a deployment of Determined.
kubectl get pods --no-headers=true -l=determined | awk '{print $1}' | xargs kubectl delete pod
kubectl get jobs --no-headers=true -l=determined | awk '{print $1}' | xargs kubectl delete jobs
# Get logs for a Determined task that make it to STDOUT or STDERR. Most logs are shipped to the
# Determined API server but logs that can't be shipped still go here. This is useful for debugging
# log shipping failures.
# For Determined tasks that require multiple pods, this will return logs for only one pod. It is
# recommended that you search the logs for each pod individually.
kubectl logs jobs/<determined-job-name>
***************************
Useful Debugging Commands
Expand Down

0 comments on commit 44c279a

Please sign in to comment.