# Windows

## 单机学习环境

> 详细信息请查看官网页面：<https://docs.docker.com/desktop/kubernetes/>

如果已经在 Windows 上安装了 Docker Desktop，按照下述步骤进行操作：

1. 打开 Docker Desktop 桌面控制台，点击 【Settings】；
2. 在左边栏中选择 【Kubernetes】；
3. 选中 【Enable Kubernetes】；
4. 最后点击右下角的 【Apply & restart】，重启 docker。

{% hint style="warning" %}

### <mark style="color:orange;">注意</mark>

* 第一次启动 Kubernetes 会花费相当长的时间，因为需要拉取相应的镜像
* 会自动安装 kubectl 工具，工具安装在以下路径：

  ```properties
  C:\Program Files\Docker\Docker\Resources\bin\kubectl.exe
  ```

  **如果之前已经安装过 kubectl，并且 kubectl 指向其他的环境，比如 minikube，需要将上下文切换到 docker-desktop 上**：

  <pre class="language-properties"><code class="lang-properties"><strong>kubectl config get-contexts
  </strong>kubectl config use-context docker-desktop
  </code></pre>

{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bohans.gitbook.io/devops/kubernetes/ji-chu-zhi-shi/an-zhuang/xue-xi-huan-jing/windows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
