|
| 1 | +(docker-desktop-k8s)= |
| 2 | + |
| 3 | +# Kubernetes on Docker Desktop (for learning and development only) |
| 4 | + |
| 5 | +```{important} |
| 6 | +[Docker Desktop] is a paid product with a [freemium tier](https://en.wikipedia.org/wiki/Freemium) for individual developers. |
| 7 | +``` |
| 8 | + |
| 9 | +[Docker Desktop] is bundled with a Kubernetes cluster on a single computer that requires activation in the [Docker Desktop]'s settings. [Docker Desktop] is suitable in order to learn about Kubernetes and to develop and test changes, but its not meant to be used for production purposes. |
| 10 | + |
| 11 | +```{important} |
| 12 | +The Zero to JupyterHub guide assumes you're using a managed Kubernetes service with one of the main cloud platforms and **[Docker Desktop] is not officially supported**. You may be able to get help on the [Jupyter community forum](https://discourse.jupyter.org/c/jupyterhub/10). |
| 13 | +``` |
| 14 | + |
| 15 | +## Kubernetes cluster requirements |
| 16 | + |
| 17 | +All the requirements are implemented in [Docker Desktop] >= 4.37.1 that includes Kubernetes >= 1.30.5: |
| 18 | + |
| 19 | +- [Dynamic Volume Provisioning](https://kubernetes.io/docs/concepts/storage/dynamic-provisioning/) for persistent storage |
| 20 | +- [LoadBalancer](https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) or [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) for managing external access to JupyterHub |
| 21 | + |
| 22 | +## Docker Desktop installation |
| 23 | + |
| 24 | +Follow the installation steps in the offical [Docker Desktop]'s Manual: |
| 25 | + |
| 26 | +- [Install Docker Desktop on Mac](https://docs.docker.com/desktop/setup/install/mac-install/) |
| 27 | +- [Install Docker Desktop on Windows](https://docs.docker.com/desktop/setup/install/windows-install/) |
| 28 | +- [Install Docker Desktop on Linux](https://docs.docker.com/desktop/setup/install/linux/) |
| 29 | + |
| 30 | + If you are on Linux, you might prefer to use minikube following {ref}`minikube-k8s`. |
| 31 | + |
| 32 | +## Kubernetes cluster creation |
| 33 | + |
| 34 | +1. Click in `Settings`. |
| 35 | +2. Click in `Kubernetes`. |
| 36 | +3. Click in `Enable Kubernetes`. |
| 37 | +4. Click in `Apply & restart`. |
| 38 | + |
| 39 | +To test if your cluster is initialized, run: |
| 40 | + |
| 41 | +```bash |
| 42 | +kubectl config get-contexts |
| 43 | +``` |
| 44 | + |
| 45 | +The response should list the cluster `docker-desktop`. |
| 46 | + |
| 47 | +```bash |
| 48 | +kubectl get node |
| 49 | +``` |
| 50 | + |
| 51 | +The response should list one running node. |
| 52 | + |
| 53 | +Congrats. Now that you have your Kubernetes cluster running, it's time to |
| 54 | +begin {ref}`setup-helm`. |
| 55 | + |
| 56 | +[Docker Desktop]: https://www.docker.com/products/docker-desktop/ |
0 commit comments