Skip to content

Instantly share code, notes, and snippets.

@rleap-m
Created May 8, 2026 17:46
Show Gist options
  • Select an option

  • Save rleap-m/2c9d45b60562e3148b0c821c10c25b21 to your computer and use it in GitHub Desktop.

Select an option

Save rleap-m/2c9d45b60562e3148b0c821c10c25b21 to your computer and use it in GitHub Desktop.
Windows node setup on MKE4

mkectl apply — Windows Node Setup Sequence

MKE 4.2.0, WS2022.

# Action Observed
1 SSH connection established HashKnownHosts=yes, keys hashed on connect
2 OS detection uname | grep Linux, uname | grep Darwin both fail; falls through to Windows check
3 Windows confirmed Get-CimInstance Win32_OperatingSystemMicrosoft Windows Server 2022 Datacenter 10.0.20348
4 Identity confirmed whoamiip-172-31-0-18\administrator; hostnameip-172-31-0-18
5 Check for existing k0s install k0s.exe version; not yet installed
6 Create C:\Program Files\mke Directory scaffolded for MKE tooling
7 Check for oci-downloader.exe Not present; needs upload
8 Upload oci-downloader.exe v0.3.0 Delivered as base64+gzip-encoded PowerShell one-liner; decoded and written in-place
9 Verify oci-downloader.exe checksum SHA256 computed and validated on-node
10 Create C:\Program Files\k0s Directory for k0s binary
11 Download k0s binary oci-downloader.exe pulls ghcr.io/mirantiscontainers/k0s-binary:v1.35.1_k0s.1k0s.exe.tmp.*
12 Detect CPU architecture $env:PROCESSOR_ARCHITECTUREAMD64
13 Discover private network interface Scans Get-NetIPAddress for RFC 1918 ranges → Ethernet 3
14 Discover private IP Queries Ethernet 3 excluding public IP → 172.31.0.18
15 Emit experimental warning windows worker node support is experimental
16 Verify Administrator privileges WindowsPrincipal.IsInRole(Administrator) → confirmed
17 Verify Windows Containers feature Get-WindowsFeature -Name ContainersInstalled
18 Check for stale temp files Looks for k0s.tmp.*; none found
19 Install k0s binary Move-Item promotes temp download → C:\Program Files\k0s\k0s.exe
20 Verify k0s version k0s.exe versionv1.35.1+k0s.1
21 Create C:\etc\k0s Config directory for join token
22 Write join token 1788-byte token written to C:\etc\k0s\k0stoken via stdin pipe
23 Validate API connectivity k0s.exe kubectl get --raw=/version against LB → k8s v1.35.1+k0s confirmed; temp kubeconfig cleaned up
24 Clean up temp kubeconfig del /f on the temp file
25 Check for existing k0sworker service sc.exe query k0sworker; not yet registered
26 Install k0s worker service --cluster-dns=10.96.0.10, --node-ip=172.31.0.18, --profile=mke-default-worker, --data-dir=C:\var\lib\k0s, --token-file=C:\etc\k0s\k0stoken
27 Start k0sworker service sc start k0sworkerSTART_PENDING, PID 3160, WIN32 and SERVICE exit codes 0x0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment