Skip to content

Commit 150f788

Browse files
aevesdockersarahsanders-dockerdvdksn
authored
ENGDOCS-2379 (#21823)
<!--Delete sections as needed --> ## Description Kubernetes freshness. Only new new content is on Troubleshooting. Rest is expanded slightly/presented better. ## Related issues or tickets <!-- Related issues, pull requests, or Jira tickets --> ## Reviews <!-- Notes for reviewers here --> <!-- List applicable reviews (optionally @tag reviewers) --> - [ ] Technical review - [ ] Editorial review - [ ] Product review --------- Co-authored-by: Sarah Sanders <[email protected]> Co-authored-by: David Karlsson <[email protected]>
1 parent bb23052 commit 150f788

File tree

2 files changed

+62
-31
lines changed

2 files changed

+62
-31
lines changed

_vale/config/vocabularies/Docker/accept.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ Zsh
154154
[Vv]irtiofs
155155
[Vv]irtualize
156156
[Ww]alkthrough
157+
bootup
157158
cgroup
158159
config
159160
containerd

content/manuals/desktop/features/kubernetes.md

Lines changed: 61 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,57 @@ aliases:
99
weight: 60
1010
---
1111

12-
Docker Desktop includes a standalone Kubernetes server and client,
13-
as well as Docker CLI integration that runs on your machine.
12+
Docker Desktop includes a standalone Kubernetes server and client, as well as Docker CLI integration, enabling local Kubernetes development and testing directly on your machine.
1413

15-
The Kubernetes server runs locally within your Docker instance, is not configurable, and is a single-node cluster. It runs within a Docker container on your local system, and
16-
is only for local testing.
14+
The Kubernetes server runs as a single-node cluster within a Docker container. This lightweight setup helps you explore Kubernetes features, test workloads, and work with container orchestration in parallel with other Docker functionalities.
1715

18-
Turning on Kubernetes allows you to deploy
19-
your workloads in parallel, on Kubernetes, Swarm, and as standalone containers. Turning on or off the Kubernetes server does not affect your other
20-
workloads.
16+
Kubernetes on Docker Desktop runs alongside other workloads, including Swarm services and standalone containers.
17+
18+
## What happens when I enable Kubernetes in Docker Desktop?
19+
20+
When you enable Kubernetes in Docker Desktop, the following actions are triggered in the Docker Desktop backend and VM:
21+
22+
- Generation of certificates and cluster configuration
23+
- Download and installation of Kubernetes internal components
24+
- Cluster bootup
25+
- Installation of additional controllers for networking and storage
26+
27+
Turning the Kubernetes server on or off in Docker Desktop does not affect your other workloads.
2128

2229
## Install and turn on Kubernetes
2330

24-
1. From the Docker Desktop Dashboard, select the **Settings**.
25-
2. Select **Kubernetes** from the left sidebar.
26-
3. Next to **Enable Kubernetes**, select the checkbox.
27-
4. Select **Apply & Restart** to save the settings and then select **Install** to confirm. This instantiates images required to run the Kubernetes server as containers, and installs the `/usr/local/bin/kubectl` command on your machine.
31+
1. Open the Docker Desktop Dashboard and navigate to **Settings**.
32+
2. Select the **Kubernetes** tab.
33+
3. Select the **Enable Kubernetes** checkbox.
34+
4. Select **Apply & Restart** to save the settings and then select **Install** to confirm. This sets up the images required to run the Kubernetes server as containers, and installs the `kubectl` command-line tool on your system at `/usr/local/bin/kubectl` (Mac) or `C:\Program Files\Docker\Docker\Resources\bin\kubectl.exe` (Windows).
2835

29-
> [!IMPORTANT]
36+
> [!NOTE]
3037
>
31-
> The `kubectl` binary is not automatically packaged with Docker Desktop for Linux. To install the kubectl command for Linux, see [Kubernetes documentation](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/). It should be installed at `/usr/local/bin/kubectl`.
38+
> Docker Desktop for Linux does not include `kubectl` by default. You can install it separately by following the [Kubernetes installation guide](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/). Ensure the `kubectl` binary is installed at `/usr/local/bin/kubectl`.
3239
33-
By default, Kubernetes containers are hidden from commands like `docker ps`, because managing them manually is not supported. Most users do not need this option. To see these internal containers, select **Show system containers (advanced)**.
40+
When Kubernetes is enabled, its status is displayed in the Docker Desktop Dashboard footer and the Docker menu.
3441

35-
When Kubernetes is turned on and running, an additional status bar in the Docker Desktop Dashboard footer and Docker menu displays.
42+
You can check which version of Kubernetes you're on with:
3643

37-
> [!NOTE]
38-
>
39-
> Docker Desktop does not upgrade your Kubernetes cluster automatically after a new update. To upgrade your Kubernetes cluster to the latest version, select **Reset Kubernetes Cluster**.
44+
```console
45+
$ kubectl version
46+
```
47+
48+
### Viewing system containers
49+
50+
By default, Kubernetes system containers are hidden. To inspect these containers, navigate to **Settings** > **Kubernetes** and then enable **Show system containers (advanced)**.
4051

41-
## Use the kubectl command
52+
You can now view the running Kubernetes containers with `docker ps` or in the Docker Desktop Dashboard.
4253

43-
Kubernetes integration provides the Kubernetes CLI command
54+
## Using the kubectl command
55+
56+
Kubernetes integration automatically installs the Kubernetes CLI command
4457
at `/usr/local/bin/kubectl` on Mac and at `C:\Program Files\Docker\Docker\Resources\bin\kubectl.exe` on Windows. This location may not be in your shell's `PATH`
4558
variable, so you may need to type the full path of the command or add it to
4659
the `PATH`.
4760

4861
If you have already installed `kubectl` and it is
49-
pointing to some other environment, such as `minikube` or a GKE cluster, ensure you change the context so that `kubectl` is pointing to `docker-desktop`:
62+
pointing to some other environment, such as `minikube` or a Google Kubernetes Engine cluster, ensure you change the context so that `kubectl` is pointing to `docker-desktop`:
5063

5164
```console
5265
$ kubectl config get-contexts
@@ -55,29 +68,46 @@ $ kubectl config use-context docker-desktop
5568

5669
> [!TIP]
5770
>
58-
> Run the `kubectl` command in a CMD or PowerShell terminal, otherwise `kubectl config get-contexts` may return an empty result.
59-
>
60-
> If you are using a different terminal and this happens, you can try setting the `kubeconfig` environment variable to the location of the `.kube/config` file.
71+
> If the `kubectl` config get-contexts command returns an empty result, try:
72+
>
73+
> - Running the command in the Command Prompt or PowerShell.
74+
> - Setting the `KUBECONFIG` environment variable to point to your `.kube/config` file.
6175
62-
If you installed `kubectl` using Homebrew, or by some other method, and
63-
experience conflicts, remove `/usr/local/bin/kubectl`.
76+
### Verify installation
6477

65-
You can test the command by listing the available nodes:
78+
To confirm that Kubernetes is running, list the available nodes:
6679

6780
```console
6881
$ kubectl get nodes
69-
7082
NAME STATUS ROLES AGE VERSION
7183
docker-desktop Ready control-plane 3h v1.29.1
7284
```
7385

86+
If you installed `kubectl` using Homebrew, or by some other method, and
87+
experience conflicts, remove `/usr/local/bin/kubectl`.
88+
7489
For more information about `kubectl`, see the
7590
[`kubectl` documentation](https://kubernetes.io/docs/reference/kubectl/overview/).
7691

92+
## Upgrade your cluster
93+
94+
Kubernetes clusters are not automatically upgraded with Docker Desktop updates. To upgrade the cluster, you must manually select **Reset Kubernetes Cluster** in settings.
95+
96+
## Troubleshooting
97+
98+
- If Kubernetes fails to start, make sure Docker Desktop is running with enough allocated resources. Check **Settings** > **Resources**.
99+
- If the `kubectl` commands return errors, confirm the context is set to `docker-desktop`
100+
```console
101+
$ kubectl config use-context docker-desktop
102+
```
103+
You can then try checking the logs of the [Kubernetes system containers](#viewing-system-containers) if you have enabled that setting.
104+
- If you're experiencing cluster issues after updating, reset your Kubernetes cluster. Resetting a Kubernetes cluster can help resolve issues by essentially reverting the cluster to a clean state, and clearing out misconfigurations, corrupted data, or stuck resources that may be causing problems. If the issue still persists, you may need to clean and purge data, and then restart Docker Desktop.
105+
77106
## Turn off and uninstall Kubernetes
78107

79108
To turn off Kubernetes in Docker Desktop:
109+
80110
1. From the Docker Desktop Dashboard, select the **Settings** icon.
81-
2. Select **Kubernetes** from the left sidebar.
82-
3. Next to **Enable Kubernetes**, clear the checkbox
83-
4. Select **Apply & Restart** to save the settings.This stops and removes Kubernetes containers, and also removes the `/usr/local/bin/kubectl` command.
111+
2. Select the **Kubernetes** tab.
112+
3. Deselect the **Enable Kubernetes** checkbox.
113+
4. Select **Apply & Restart** to save the settings. This stops and removes Kubernetes containers, and also removes the `/usr/local/bin/kubectl` command.

0 commit comments

Comments
 (0)