Docker Desktop
Connect Infra App to your local Kubernetes cluster in Docker Desktop

Prerequisites

Enable Kubernetes

Access Docker Desktop preferences by click on the Docker Desktop menu bar icon and then Preferences...
Navigate to Kubernetes in the sidebar, then click Enable Kubernetes. Finally click Apply & Restart

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:
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:
1
apiVersion: apps/v1
2
kind: Deployment
3
metadata:
4
name: metrics-server
5
namespace: kube-system
6
labels:
7
k8s-app: metrics-server
8
spec:
9
selector:
10
matchLabels:
11
k8s-app: metrics-server
12
template:
13
metadata:
14
name: metrics-server
15
labels:
16
k8s-app: metrics-server
17
spec:
18
serviceAccountName: metrics-server
19
volumes:
20
# mount in tmp so we can safely use from-scratch images and/or read-only containers
21
- name: tmp-dir
22
emptyDir: {}
23
containers:
24
- name: metrics-server
25
image: k8s.gcr.io/metrics-server-amd64:v0.3.6
26
imagePullPolicy: IfNotPresent
27
args:
28
- --cert-dir=/tmp
29
- --secure-port=4443
30
- --kubelet-insecure-tls # Add this line
31
ports:
32
- name: main-port
33
containerPort: 4443
34
protocol: TCP
35
securityContext:
36
readOnlyRootFilesystem: true
37
runAsNonRoot: true
38
runAsUser: 1000
39
volumeMounts:
40
- name: tmp-dir
41
mountPath: /tmp
42
nodeSelector:
43
kubernetes.io/os: linux
44
kubernetes.io/arch: "amd64"
Copied!
Warning: This setting should only be used for the local Docker Desktop Kubernetes cluster, and not recommended for any hosted or production clusters.
Last, apply the modified components.yaml config file to your cluster.
1
kubectl apply -f components.yaml
Copied!