Skip to content

docs: add a single-node guide with MicroK8s - #252

Merged
uniqueg merged 2 commits into
devfrom
docs/microk8s-guide
Nov 7, 2026
Merged

uniqueg merged 2 commits into
devfrom
docs/microk8s-guide

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds docs/microk8s.md, a short single-node guide: install MicroK8s with the addons dns, hostpath-storage and ingress, install the chart from the repo with a minimal values file (camelCase keys), run a hello-world task with curl and poll it to COMPLETE, and remove everything. Linked from the nav (Guides) and from the installation section of docs/deployment.md. No equivalent guide existed (only a NodePort note for Minikube/kind in deployment.md); the single-node guide belongs in this repo's docs/, next to the chart.

Closes elixir-cloud-aai/docs#12

Verification

  • mkdocs build --strict: passes.
  • Chart and smoke test run end to end on a throwaway single-node Minikube (docker driver, Kubernetes 1.34, ingress-nginx, default storage class, own kubeconfig, no shared cluster touched): helm upgrade --install with the values file of the guide, Ingress reachable, service-info answered, hello-world task went QUEUED -> RUNNING -> COMPLETE, stdout Hello, TESK!. The cluster was deleted afterwards.
  • Found while testing: the API needs about a minute to start and the Ingress answers 502 until then (no readiness probe); the guide says so.
  • Not verified: the MicroK8s-specific steps (snap install, group, addon names, Ingress class public, ports 80/443 on the host, snap remove --purge), as MicroK8s needs root and snap, not available here. The guide marks this in a note.

Light lane (docs only): I reviewed the diff myself.

Declined review findings

None (no reviewer subagents in the light lane).

Open questions

None.

🤖 Generated with Claude Code

Summary by Sourcery

Add documentation for running TESK on a single MicroK8s node.

New Features:

  • Add a user-facing guide for installing and running TESK on a single-node MicroK8s cluster, including setup, task execution, and cleanup.

Documentation:

  • Link the MicroK8s guide from the deployment documentation and Guides navigation.

Install MicroK8s with the addons that TESK needs, install the chart with a minimal values file, run a hello-world task and remove everything again.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Documentation

Add the single-node MicroK8s guide and link to it from the deployment page and Guides navigation.

  • docs/deployment.md L102-103
  • docs/microk8s.md L1-176
  • mkdocs.yml L92

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (b874eae) to head (f28ba7e).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #252   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          229       229           
=========================================
  Hits           229       229           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uniqueg
uniqueg marked this pull request as ready for review November 7, 2026 07:27

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 4 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="docs/microk8s.md" line_range="65" />
<code_context>
+and the storage class are ready:
+
+```bash
+microk8s config > microk8s-kubeconfig
+export KUBECONFIG=$PWD/microk8s-kubeconfig  # in Fish: set -x KUBECONFIG $PWD/microk8s-kubeconfig
+microk8s kubectl get nodes
</code_context>
<issue_to_address>
**Local users gain cluster access**

When the shell's umask makes the generated file readable by other users or the checkout is staged, `microk8s config > microk8s-kubeconfig` stores cluster credentials in a file readable to local users, and staging the checkout publishes them; those users can administer the cluster.

Create the kubeconfig with owner-only permissions and keep it out of staged changes.
</issue_to_address>

### Comment 2
<location path="docs/microk8s.md" line_range="65" />
<code_context>
+and the storage class are ready:
+
+```bash
+microk8s config > microk8s-kubeconfig
+export KUBECONFIG=$PWD/microk8s-kubeconfig  # in Fish: set -x KUBECONFIG $PWD/microk8s-kubeconfig
+microk8s kubectl get nodes
</code_context>
<issue_to_address>
**Existing local files are overwritten or deleted**

When the checkout already contains one of the guide's fixed-name files, shell redirection truncates an existing `microk8s-kubeconfig` or `hello.json`, and cleanup removes the named files; following the guide with same-named files already in the checkout destroys their contents.

Use a dedicated temporary directory or check for existing files and choose unused names before writing or removing them.

Also at `docs/microk8s.md:124`, `docs/microk8s.md:170`.
</issue_to_address>

### Comment 3
<location path="docs/microk8s.md" line_range="66" />
<code_context>
+
+```bash
+microk8s config > microk8s-kubeconfig
+export KUBECONFIG=$PWD/microk8s-kubeconfig  # in Fish: set -x KUBECONFIG $PWD/microk8s-kubeconfig
+microk8s kubectl get nodes
+microk8s kubectl get storageclass
</code_context>
<issue_to_address>
**Commands lose configured cluster**

When the user already has `KUBECONFIG` set before following the guide, `export KUBECONFIG=...` replaces the existing value, and cleanup's `unset KUBECONFIG` does not restore it; subsequent `kubectl` or Helm commands use the default context instead of the user's configured cluster.

Restore the previous `KUBECONFIG` value during cleanup, or scope the change so it does not alter the user's shell.

Also at `docs/microk8s.md:169`.
</issue_to_address>

### Comment 4
<location path="docs/microk8s.md" line_range="104-105" />
<code_context>
+started, the Ingress answers `502 Bad Gateway`:
+
+```bash
+kubectl get pods -n tesk  # the pod of tesk-api is Running and READY 1/1
+curl http://localhost/ga4gh/tes/v1/service-info
+```
+
</code_context>
<issue_to_address>
**API check races startup**

When the API pod becomes ready before the API has finished starting, `kubectl get pods` can report the API pod as `Running` and `READY 1/1` before the application is ready because the Deployment has no readiness probe. The following one-shot `curl` then gets the documented 502 instead of service info, so the guide's check fails during normal startup.

Poll the service-info endpoint until it succeeds, or provide a wait step that does not treat pod readiness alone as API readiness.
</issue_to_address>

Linked issues

#12 Write document how to setup TESK using microk8s · 1 of 1 met

# Requirement Status Notes
1 Write a document explaining how to set up TESK using MicroK8s. ✅ Met docs/microk8s.md covers installing MicroK8s and required addons, deploying TESK, running a task, and cleanup.

Sourcery assessment

Approval pending. 4 findings to address first.

Blocking findings: docs/microk8s.md:65, docs/microk8s.md:65, docs/microk8s.md:66, docs/microk8s.md:105


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread docs/microk8s.md Resolved
Comment thread docs/microk8s.md Resolved
Comment thread docs/microk8s.md Resolved
Comment thread docs/microk8s.md Resolved
Keep the kubeconfig private and outside the checkout, pass the values and the task inline, and poll the service info.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sourcery assessment

Approved.

@uniqueg
uniqueg merged commit 7a7a39c into dev Nov 7, 2026
21 checks passed
@uniqueg
uniqueg deleted the docs/microk8s-guide branch November 7, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write document how to setup TESK using microk8s

1 participant