Skip to main content

Local cluster

make minikube.up builds both images, loads them into a minikube node and installs the chart. It is the quickest way to see the whole system running.

Prerequisites​

Docker with Buildx, minikube, helm, kubectl and make. The end-to-end check also needs curl and python3.

Bring it up​

make minikube.up

The target:

  1. creates the Docker network idekube on 192.168.58.0/24 (see Reach it from other machines) and starts a minikube profile named idekube on it with the ingress addon and Calico as its network, which enforces the network policies of workspaces, unless they already exist;
  2. builds the apiserver, agent and frontend images with a fresh dev-<timestamp> tag, loads them into the node and, once the release has rolled out, removes earlier builds;
  3. installs or upgrades the release idekube in the namespace idekube with deploy/helm/idekube-platform/values-minikube.yaml (two API server replicas, debug logging, the bundled Prometheus), with the worker local and its agent in the same namespace;
  4. sets ingress.host to idekube.<minikube ip>.nip.io and worker.workspaces.domain to ws.<minikube ip>.nip.io, unless .env.local names your own (see below);
  5. when DEV_WS_DOMAIN and DEV_TLS_SECRET are configured (and the TLS secret exists in the namespace), runs make minikube.zitadel so Zitadel is deployed, seeded, and registered in auth.providers ready to test on the sign-in page;
  6. prints the URL and the administrator's credentials.

The nip.io names resolve to the minikube node IP, so that IP must be reachable from your machine.

The profile and namespace can be changed with PROFILE and NAMESPACE, for example make minikube.up PROFILE=dev.

To serve it on your own domain, copy .env.local.example to .env.local at the repository root and fill in your names. Git ignores .env.local; without it, make minikube.up says so and uses the nip.io names.

.env.local
DEV_HOST=idekube.example.org
DEV_WS_DOMAIN=ws.example.org
DEV_TLS_SECRET=idekube-tls # optional, see "Serve it over HTTPS"
DEV_ZONE=example.org # the Cloudflare zone the certificate is issued in

The names must resolve to the minikube node IP, 192.168.58.2 by default.

Reach it from other machines​

Docker's default bridge mode drops traffic that is routed to a container port it did not publish, so other machines cannot reach the node's ports 80 and 443 even with a route to it. make minikube.up therefore runs the node on its own network in the gateway mode nat-unprotected, which lets routed traffic through; DEV_SUBNET in .env.local changes its subnet.

Access is then controlled by whatever routes to that subnet. With NetBird, add 192.168.58.0/24 as a network on the machine that runs minikube and grant it in a policy; every peer the policy admits reaches the node, on all of its ports. Point the DNS names at 192.168.58.2 as DNS-only records.

A cluster created before this, or by plain minikube start, sits on a network that drops routed traffic, and enforces no network policies; make minikube.up refuses to use the first and warns about the second. Recreate it with make minikube.delete, which deletes the node and its network, then make minikube.up.

A second worker​

make minikube.worker runs a second worker in a cluster of its own, the minikube profile idekube-plain beside the first node on its Docker network: it creates the cluster, enrolls the worker plain in the platform, cordoned so that nothing goes to it but what names it, and installs its agent from the idekube-worker chart with the release the platform runs. Its network is minikube's default, which enforces no network policy, so it also shows what the platform says of such a worker. From then on make minikube.up gives it each new build, and make minikube.delete deletes it too. Two clusters on one machine need fs.inotify.max_user_instances at 512 or more; the script says when it is lower.

What plugins talk to​

Some plugins reach services outside the platform. make minikube.services runs development stand-ins for them in the idekube-dev namespace, and the minikube values point the plugins' settings at them:

ServiceStands in forSee it
MailpitThe mail server of notifications. It keeps every email and sends none on.kubectl -n idekube-dev port-forward svc/mailpit 8025, then http://127.0.0.1:8025
GiteaA Git host for the Git plugin, at http://gitea.<node IP>.nip.io. Create its first user with kubectl -n idekube-dev exec deploy/gitea -- gitea admin user create --admin ..., then an OAuth2 application to list as a gitea provider. Its data is gone with its pod.http://gitea.192.168.58.2.nip.io
ForgejoForgejo, the fork of Gitea, at http://forgejo.<node IP>.nip.io, which the Git plugin takes as a gitea host. It is set up as Gitea is, with forgejo admin user create. Its data is gone with its pod.http://forgejo.192.168.58.2.nip.io
SeaweedFSThe platform's object store, with a bucket idekube. Its data is gone with its pod.kubectl -n idekube-dev port-forward svc/seaweedfs 8333
CanvasAn LMS for the Canvas plugin, at https://canvas.<DEV_WS_DOMAIN> under the workspaces' wildcard name and certificate. make minikube.canvas runs it; it is not part of minikube.services, as it needs 3 GiB of memory and ten minutes to start. It then makes the people and courses of the test accounts and a developer key for its files (scripts/cluster/canvas.sh seed), and keeps the ids of the courses and the key in e2e/canvas.json, which is not committed. Its data is gone with its pod.https://canvas.<DEV_WS_DOMAIN>, as one of the test accounts
ZitadelAn OpenID Connect identity provider for single sign-on, at https://zitadel.<DEV_WS_DOMAIN> under the workspaces' wildcard name and certificate. make minikube.zitadel (also invoked automatically by make minikube.up when DEV_WS_DOMAIN and DEV_TLS_SECRET are set) runs it with an ephemeral PostgreSQL sidecar, seeds an IDEKube project, OIDC application and test users (scripts/cluster/zitadel.sh seed) into e2e/zitadel.json (untracked), and registers zitadel in auth.providers (scripts/cluster/zitadel.sh register) so Zitadel SSO appears immediately on the sign-in page. Its data is gone with its pod.https://zitadel.<DEV_WS_DOMAIN>

Test accounts​

e2e/accounts.yaml lists the accounts to try the installation with, and their passwords, which are for development only:

  • on the platform, two administrators (ada-admin, a super_admin, and brook-admin), an operator, a template reviewer, an auditor and four people in two shared teams;
  • on Canvas, two account administrators, three teachers and five students in three courses, some teaching or taking more than one.

make minikube.accounts makes the platform hold them, and every make e2e does too; make minikube.canvas does for Canvas. Both add what is missing and correct what differs, a password only when it no longer signs in, and leave alone what the file does not list. The first time, they make the accounts as the bootstrap administrator; once it has a second factor, give ADMIN_TOKEN an API token of an administrator instead. People in Canvas get their platform account when they first launch an activity.

Check it end to end​

make e2e # standard tier (needs only make minikube.up)
make e2e GROUP=network # standard tests for one subsystem
make e2e GROUP=auth TIER=extended # standard + extended for one subsystem
make e2e TIER=extended # full suite including extra-infrastructure specs

The suite in e2e/ drives the installation as people do, in Chrome through Playwright and with kubectl to see what lands in the cluster: accounts and second factors, templates and their review, workspaces behind the gateway, their sidecar, files and tasks, volumes, Calico network policies, multi-node clusters, usage reporting, the platform's defenses, and optional plugins. Every spec cleans up what it created, users, templates, workspaces, settings and plugin switches, whether it passed or not.

Every test declares one subsystem tag from scripts/test/groups.json (@core, @auth, @teams, @templates, @workspaces, @network, @cluster, @workers, @ops, @plugins). The standard tier runs only self-contained tests that need nothing beyond make minikube.up. Slower specs and those that need extra infrastructure also carry @extended together with their requirement tag: @services (make minikube.services), @multi-worker (make minikube.worker), @canvas (make minikube.canvas), @zitadel (make minikube.zitadel), @chaos (kills pods and containers through minikube) and @internet (reaches Cloudflare Turnstile). SPECS=specs/gateway.spec.ts make e2e narrows to specific files; TIER=extended-only runs only extended specs. The report of the last run is in e2e/report.

It acts as the first super_admin of the test accounts, and leaves the bootstrap administrator to people. It finds the installation through kubectl: the address from the ingress, the bootstrap administrator's password from the release secret, to make the test accounts the first time. To run it against another installation:

KUBE_CONTEXT=prod KUBE_NAMESPACE=idekube BASE_URL=https://idekube.example.org ADMIN_PASSWORD=... make e2e

Serve it over HTTPS​

scripts/cluster/cloudflare-certs.sh issues a Let's Encrypt certificate for an installation whose domain is managed by Cloudflare. It proves ownership with a DNS-01 challenge, so the cluster needs no inbound connection and may sit on a private network, for example behind a VPN.

CLOUDFLARE_API_TOKEN=... ZONE=example.org scripts/cluster/cloudflare-certs.sh up

The token needs the permissions Zone / Zone / Read and Zone / DNS / Edit on the zone. The script:

  1. installs cert-manager into the namespace cert-manager;
  2. creates the ClusterIssuer letsencrypt-cloudflare, which solves challenges through the Cloudflare API;
  3. requests one certificate for idekube.example.org and *.example.org into the secret idekube-tls of the release namespace, and waits until it is issued;
  4. prints the chart values that serve the release with it.

The script does not touch DNS or the release. Point the names at the cluster yourself, then upgrade the release with the printed values: ingress.host, ingress.tls.enabled, ingress.tls.secretName, worker.workspaces.domain and worker.workspaces.tlsSecret. For minikube, put the names, the secret and the zone into .env.local instead and run CLOUDFLARE_API_TOKEN=... make minikube.certs once, before or after make minikube.up. cert-manager renews the certificate before it expires.

Workspaces are served one level below the zone by default; WS_DOMAIN=ws.example.org moves them one level down. HOST and WS_DOMAIN change the names, SECRET the secret, EMAIL sets the ACME account's contact, and CONTEXT and NAMESPACE select the installation. Use STAGING=1 while experimenting: Let's Encrypt allows five identical certificates a week. The certificate must be in the release namespace, where the gateway's ingress is.

scripts/cluster/cloudflare-certs.sh down removes the certificate, the issuer and cert-manager.

Tear it down​

make minikube.down

This uninstalls the release and deletes the namespace, including the workspaces it contains. The minikube profile itself keeps running; make minikube.delete removes it together with its network. A recreated cluster needs make minikube.certs again.