Skip to content

Commit

Permalink
[Docs] Clarify k8s private registry usage in docs (#3998)
Browse files Browse the repository at this point in the history
* Clarify k8s private registry auth in docs.

* comments
  • Loading branch information
romilbhardwaj authored Sep 26, 2024
1 parent a63893b commit 6bb5b2a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/source/examples/docker-containers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ SkyPilot can run a container either as a task, or as the runtime environment of
Running Containers as Tasks
---------------------------

.. note::

On Kubernetes, running Docker runtime in a pod is not recommended. Instead, :ref:`use your container as a runtime environment <docker-containers-as-runtime-environments>`.

SkyPilot can run containerized applications directly as regular tasks. The default VM images provided by SkyPilot already have the Docker runtime pre-configured.

To launch a containerized application, you can directly invoke :code:`docker run` in the :code:`run` section of your task.
Expand Down Expand Up @@ -173,6 +177,10 @@ Any GPUs assigned to the task will be automatically mapped to your Docker contai
Private Registries
^^^^^^^^^^^^^^^^^^

.. note::

These instructions do not apply if you use SkyPilot to launch on Kubernetes clusters. Instead, see :ref:`Using Images from Private Repositories in Kubernetes<kubernetes-custom-images-private-repos>` for more.

When using this mode, to access Docker images hosted on private registries,
you can provide the registry authentication details using :ref:`task environment variables <env-vars>`:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ Once your cluster administrator has :ref:`setup a Kubernetes cluster <kubernetes
$ kubectl config set-context --current --namespace=mynamespace
.. _kubernetes-custom-images:

Using Custom Images
-------------------
By default, we use and maintain a SkyPilot container image that has conda and a few other basic tools installed.
Expand All @@ -140,6 +142,8 @@ Your image must satisfy the following requirements:

If your cluster runs on non-x86_64 architecture (e.g., Apple Silicon), your image must be built natively for that architecture. Otherwise, your job may get stuck at :code:`Start streaming logs ...`. See `GitHub issue <https://github.com/skypilot-org/skypilot/issues/3035>`_ for more.

.. _kubernetes-custom-images-private-repos:

Using Images from Private Repositories
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To use images from private repositories (e.g., Private DockerHub, Amazon ECR, Google Container Registry), create a `secret <https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-secret-by-providing-credentials-on-the-command-line>`_ in your Kubernetes cluster and edit your :code:`~/.sky/config.yaml` to specify the secret like so:
Expand Down

0 comments on commit 6bb5b2a

Please sign in to comment.