# Docker Desktop

### Prerequisites

* Install [Docker Desktop](https://www.docker.com/products/docker-desktop)

### Enable Kubernetes

Access Docker Desktop preferences by click on the Docker Desktop menu bar icon and then **Preferences...**

![](/files/-MBuGWlndQbsRQj8eWan)

Navigate to **Kubernetes** in the sidebar, then click **Enable Kubernetes.** Finally click **Apply & Restart**

![](/files/-MBuGbqbx0u_UvzQ-r_T)

### Connect Infra App

Infra App will automatically work with Docker Desktop. Simply open it by clicking on the **Cluster Switcher** and then choosing **docker-desktop:**

![](/files/-MKChMlBD3M20aVppUgT)

Voila! Infra App is now connected to Docker Desktop's Kubernetes cluster:

### Installing Metrics Server

Metrics server isn't included with Docker Desktop's installation of Kubernetes, and the default metrics-server setup guide won't work out of the box. Follow the steps below to install metrics server:

Download the latest `components.yaml` file from <https://github.com/kubernetes-sigs/metrics-server/releases> and open it in your text editor.

Then, add the line `--kubelet-insecure-tls` under the `args:` section:

```
apiVersion: apps/v1
kind: Deployment
metadata:
  name: metrics-server
  namespace: kube-system
  labels:
    k8s-app: metrics-server
spec:
  selector:
    matchLabels:
      k8s-app: metrics-server
  template:
    metadata:
      name: metrics-server
      labels:
        k8s-app: metrics-server
    spec:
      serviceAccountName: metrics-server
      volumes:
      # mount in tmp so we can safely use from-scratch images and/or read-only containers
      - name: tmp-dir
        emptyDir: {}
      containers:
      - name: metrics-server
        image: k8s.gcr.io/metrics-server-amd64:v0.3.6
        imagePullPolicy: IfNotPresent
        args:
          - --cert-dir=/tmp
          - --secure-port=4443
          - --kubelet-insecure-tls # Add this line
        ports:
        - name: main-port
          containerPort: 4443
          protocol: TCP
        securityContext:
          readOnlyRootFilesystem: true
          runAsNonRoot: true
          runAsUser: 1000
        volumeMounts:
        - name: tmp-dir
          mountPath: /tmp
      nodeSelector:
        kubernetes.io/os: linux
        kubernetes.io/arch: "amd64"
```

{% hint style="warning" %}
**Warning**: This setting should only be used for the local Docker Desktop Kubernetes cluster, and not recommended for any hosted or production clusters.
{% endhint %}

Last, apply the modified `components.yaml` config file to your cluster.

```
kubectl apply -f components.yaml
```


---

# 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://docs.infra.app/connect-your-cluster/docker-desktop.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.
