This guide provides instructions to set up a Kubernetes cluster required for running the Umbrella Chart.
CPU (Cores) | Memory (GB) |
---|---|
4 | 6 |
The above specifications are the minimum requirements for a local development setup. Adjust resources based on your workload for larger or production environments.
Note It is recommended to use Linux or macOS because those two are the most tested platforms with the umbrella.
Start a Minikube cluster with the following command:
minikube start --cpus=4 --memory=6gb
Please refer to option 1 with Minikube for the cluster setup in case you're using Docker Desktop, which is the most tested and therefore the recommended option. Option 2 outlines lima with K3s as cluster option in case Docker Desktop isn't available.
Start a Minikube cluster with the following command:
minikube start --cpus=4 --memory=6gb
In this case, a tested way to setup your local kubernetes cluster is with lima and K3s:
brew install lima
#as we are using a vm template, we download it first
curl -O https://raw.githubusercontent.com/lima-vm/lima/refs/heads/master/templates/k3s.yaml
then we need to modify it a little, to propagate your proxysettings, add the following:
propagateProxyEnv: true
if you for example need ca-certificates because of a corporate proxy then add the following:
caCerts:
removeDefaults: null
files:
- /path/to/your/certificates/ca-certificates.crt
to adjust the size of your vm add:
cpus: 6
memory: 8GiB
to support also non-arm images in your cluster add:
rosetta:
enabled: true
binfmt: true
vmType: vz
as K3s comes with traefik by default and these helm charts are for NGINX ingress, we need to modify the install script (starting line 39) a little:
- mode: system
script: |
#!/bin/bash
set -eux -o pipefail
export K3S_KUBECONFIG_MODE="644"
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--disable traefik" sudo sh -
cat >/var/lib/rancher/k3s/server/manifests/ingress-nginx.yaml <<EOF
apiVersion: v1
kind: Namespace
metadata:
name: ingress-nginx
---
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
name: ingress-nginx
namespace: kube-system
spec:
chart: ingress-nginx
repo: https://kubernetes.github.io/ingress-nginx
targetNamespace: ingress-nginx
version: v4.11.2
set:
valuesContent: |-
fullnameOverride: ingress-nginx
controller:
kind: DaemonSet
hostNetwork: true
hostPort:
enabled: true
service:
enabled: false
publishService:
enabled: false
metrics:
enabled: true
serviceMonitor:
enabled: false
config:
use-forwarded-headers: "true"
EOF
after this you can start your vm:
#prepare no_proxy for the testdomains
export no_proxy=$no_proxy,192.168.5.15,.test
#start the vm
limactl start k3s.yaml
#configure kubectl
export KUBECONFIG="/Users/YOURUSER/.lima/docker/copied-from-guest/kubeconfig.yaml"
For DNS resolution to work correctly on Windows, you have two options:
Start Minikube with administrator privileges using the --driver=hyperv
flag:
minikube start --cpus=4 --memory=6gb --driver=hyperv
Alternatively, you can use the native Kubernetes cluster provided by Docker Desktop:
-
Enable Kubernetes in Docker Desktop:
- Navigate to Settings > Kubernetes and enable the Kubernetes option.
-
Install an NGINX Ingress Controller:
helm upgrade --install ingress-nginx ingress-nginx --repo https://kubernetes.github.io/ingress-nginx --namespace ingress-nginx --create-namespace
-
Use
127.0.0.1
as the Cluster IP and manually configure ingress.
⚠️ The rest of the tutorial assumes a minikube cluster, however.
After starting Minikube or Docker Desktop Kubernetes, verify the cluster setup:
-
Check that your cluster is running:
kubectl cluster-info
-
Open the Minikube dashboard to monitor resources:
minikube dashboard
Use tools like the Minikube dashboard (or Open Lens) to visualize your cluster and deployed components.
For networking setup, proceed to the Network Setup Guide.
This work is licensed under the CC-BY-4.0.
- SPDX-License-Identifier: CC-BY-4.0
- SPDX-FileCopyrightText: 2024 Contributors to the Eclipse Foundation
- Source URL: https://github.com/eclipse-tractusx/tractus-x-umbrella