ATAK test device
atak/ runs the real Android Tactical Assault Kit for Civilian Use (ATAK-CIV) app, built from the public source in the upstream/atak-civ submodule (tag 5.5.1.10), in an Android-x86 virtual machine (VM) managed by KubeVirt. It behaves like a field device: it imports a connection data package with its client certificate, streams Cursor on Target (CoT) events on 8089 over mutual Transport Layer Security (TLS), and shows up in /Marti/api/clientEndPoints. A phone view of its screen is served at https://atak.<domain>/ behind Keycloak.
The device runs a Team Awareness Kit (TAK) client. It is optional and separate from the TAK package. Nothing in zarf.yaml or the default tests deploys it. The dedicated workflow .github/workflows/atak-e2e.yaml builds and deploys it on the normal test cluster.
Requirements
Section titled “Requirements”- amd64 nodes with
/dev/kvm. The VM image is Android-x86 and the Android application package (APK) is built forx86_64only. There is no arm64 build (see Supported architectures). - A 2Gi guest and 2 vCPU for the VM, plus KubeVirt. 2Gi is the configured guest in
atak/deploy/device.yaml. It is the size this trial asks the scheduler for, together with KubeVirt’s launcher overhead. A successful boot at 2Gi would not make it a measured minimum. - The standard TAK streaming port 8089 on the passthrough gateway (
standardPortsincharts/takserver/values.yaml) and the in-cluster Domain Name System (DNS) rewrite, so the device can reachtakserver-stream.<domain>the way a phone would.
Images
Section titled “Images”| Image | Built from | Contents |
|---|---|---|
atak-civ-vm |
atak/vm/Dockerfile |
KubeVirt containerDisk: Android-x86 9.0-r2 kernel and initrd in /boot, the system as an ext4 qcow2 at /disk/android.qcow2 (about 950 MB) |
atak-viewer |
atak/viewer/Dockerfile |
ws-scrcpy v0.8.1 (MIT) with the shell and file listing compiled out, an adb client, and a phone-bezel page |
atak-driver |
atak/apk/Dockerfile target driver |
The ATAK APK, adb, and atak/driver/drive.sh. Test tool only, not in the package |
The APK build (atak/apk/Dockerfile, driven by atak/ci/build-apk.sh) compiles the takthirdparty natives, the Conan dependencies, and cesium-native from source. A cold build takes well over an hour on a GitHub runner; the layers are cached in ghcr.io/jonathanagustin/uds-takserver/build-cache. No key, certificate, or password is in any image. The APK is signed with the debug keystore that ships in the public atak-civ repository.
Continuous integration (CI) tags each image with the ATAK version and a hash of its inputs, for example atak-civ-vm:5.5.1.10-<hash>. When that tag is in GitHub Container Registry (GHCR), CI pulls it. A pull request builds and pushes only the images whose inputs changed. Fork pull requests cannot push, so they build locally. After a passing e2e run on main, the plain 5.5.1.10 tags point at the tested images. packages/atak-device:5.5.1.10 points at the tested Zarf package. See Reused build outputs.
Deploy
Section titled “Deploy”For deployment, provisioning, and connection checks in one procedure, see Connect the ATAK test device.
./atak/ci/create-package.sh 5.5.1.10 --confirmuds zarf package deploy zarf-package-atak-device-amd64-*.tar.zst --set-values global.domain=uds.dev --confirmOr deploy the published package without building it. For v1beta1 packages, use --set-values global.domain=uds.dev. Existing v1alpha1 packages use --set-variables DOMAIN=uds.dev.
uds zarf package deploy oci://ghcr.io/jonathanagustin/uds-takserver/packages/atak-device:5.5.1.10 \ --architecture amd64 --set-variables DOMAIN=uds.dev --confirmThe package (atak/zarf.yaml) has two components:
kubevirt: KubeVirt v1.9.1 (operator manifest pinned by checksum), the KubeVirt custom resource (CR) inatak/deploy/kubevirt-cr.yaml, and the Unified Defense Stack (UDS) policy exemption it needs. Kubernetes 1.37, which CI runs (k3s v1.37.1), enforces numeric formats in custom resource definition (CRD) schemas. v1.6.x and v1.7.x declare the kernel and containerDisk checksums as int32, so a CRC32 above 2^31 makes every virtual machine instance (VMI) status update fail and the VMI staysScheduledwhile the guest runs. Since v1.9.0 KubeVirt turns on every Beta feature gate by default, includingImageVolume. With it, the launcher pod gets the containerDisk, the kernel boot image and thecontainer-diskbinary as Kubernetes image volumes, and a container runtime without Container Runtime Interface (CRI) image volume support mounts them empty, so the pod fails with/container-disk-binary/usr/bin/container-disk: no such file or directory(kubevirt#17460, k3s#14323). The CR disablesImageVolume, so KubeVirt copies the binary with an init container and virt-handler mounts the disk as in v1.8. It also disablesTemplate, whose virt-template images are not in the package.atak-device: the VM, Serviceatak-device-adb, the viewer Deployment, and the UDS Packageatak. The Package’s expose entry probeshttps://atak.<domain>/phone.html. That path is the viewer page. Authservice sits in front of it, and the operator’s probe client is what the check uses.
Check the viewer uptime probe
Section titled “Check the viewer uptime probe”Run ATAK e2e by hand with the uptime_probe input enabled. The run first
adds atak/ci/monitoring/uds-bundle.yaml to the normal slim cluster, then deploys
and tests the ATAK device. It installs only Core monitoring, without the
logging, runtime-security, backup, or Portal layers. Grafana has zero replicas
because the check queries Prometheus directly.
This option remains off by default. The deploy step records allocated node
resources and host memory. The manual run on 9aebc946 requested 10850Mi
after Core monitoring and left the 3348Mi virt-launcher Pending, so the
authenticated probe never ran. That launcher request was the 3Gi guest plus
KubeVirt overhead. The opt-in bundle keeps Prometheus and Blackbox. Grafana
has zero replicas. Alertmanager and the node exporter are off, and
kubeStateMetrics.enabled is false so kube-state-metrics is left out.
Prometheus requests 256Mi. Those monitoring cuts apply only to this CI bundle.
The device guest is 2Gi in the package and in atak/ci/vm-smoke.sh. Processor allocation
stays at 2 cores, the video=720x1280 framebuffer argument stays, and the
manifest does not set a memory request below the guest or
overcommitGuestOverhead. 2Gi is that configured guest. This page does not
treat it as a measured minimum, and it does not say the launcher will
schedule until an opt-in run shows the pod placed, Android booted, and the
authenticated probe fresh.
After the device and viewer single sign-on (SSO) checks pass, atak/ci/uptime-probe.py requires:
- Probe
atak/uds-atak-tenant-uptimetargets exactlyhttps://atak.<domain>/phone.htmlusing the operator-generatedhttp_200x_sso_atak_uds-atak-viewer-probemodule. probe_success=1,probe_http_status_code=200, andprobe_http_redirects=0for that exact target, scraped within the last 120 seconds. Freshness is the scrape time fromtimestamp(metric). Prometheus still returns the last sample through its lookback period (five minutes by default), and an instant query’s sample timestamp is the evaluation time, so that returned value is not fresh by itself. A redirect to Keycloak’s login page cannot pass.
The operator provisions the probe client and its client-credentials module;
the test does not copy its secret or edit Blackbox configuration. Evidence is
saved to out/atak-uptime-probe.json in the run’s atak-e2e artifact. A missing
Probe, missing monitoring service, stale series, or failed query fails the run.
To repeat only the assertion on a cluster where Core monitoring and ATAK are already installed:
python3 -B atak/ci/uptime-probe.pySet DOMAIN when the cluster does not use uds.dev.
Device certificate
Section titled “Device certificate”The device authenticates with a client certificate, the way a provisioned field device does. There is no password enrollment.
At run time atak/ci/e2e.sh applies a TakClient for callsign atak-device in group Operators, waits for it to be Ready, and copies package.zip from Secret takclients/atak-device into Secret atak/atak-device-dpk, which the driver pod mounts. The takserver-oidc watcher does the work:
- It creates a key and certificate signing request (CSR) with
CN=atak-device, O=TAK, OU=UDSand asks TAK to sign it through Basic enrollment on 8446. TAK sets the lifetime globally (TAKServerCAConfig, 30 days by default). The watcher validates the returned key, certificate authority (CA) signature, subject, client usage and validity before publishing it. - It registers
atak-deviceas a TAK file user inOperatorsthrough TAK’s admin application programming interface (API) on 8443. TAK 5.7 maps a certificate to a user this way:X509Authenticatormatches a client certificate against the file users by fingerprint or by the CN, and takes that user’s groups.Operatorsis the group Keycloak users get, so the device and CloudTAK users see each other. A certificate with no file user still connects, but only in the anonymous group. - It builds a standard ATAK connection data package:
MANIFEST/manifest.xml,certs/server.prefwith one streamtakserver-stream.<domain>:8089:ssland itscaLocation0,caPassword0,certificateLocation0, andclientPassword0entries, the clientcerts/atak-device.p12, and the CA incerts/truststore.p12. Both PKCS#12 files use SHA-1 and 3DES, which Android 9 reads, and a generated password. The CA certificate in the truststore has a friendlyName (tak-ca). Without one, Android’s PKCS12 keystore lists no entry and ATAK reports “Unable to validate Truststore”.
The driver installs the APK over adb, taps through the first-run prompts, pushes the package to /sdcard/Download/atak-device.dpk, and restarts ATAK. On start ATAK imports Download/atak*.dpk files (PreferenceControl), the normal import path for a provisioned device. The .p12 files go to atak/cert, the .pref adds the stream with those certificates, and ATAK connects to 8089 over mutual TLS. The e2e job then looks for atak-device in /Marti/api/subscriptions/all and /Marti/api/clientEndPoints.
Inside the cluster takserver.<domain> resolves to the tenant gateway, so the device uses takserver-stream.<domain>. The viewer login uses the Keycloak user.
Test location
Section titled “Test location”The VM has no Global Positioning System (GPS), so the device reports a fixed test location instead.
Before ATAK’s first start the driver stages a preferences file at atak/config/prefs/defaults. ATAK loads that file once at start-up and then deletes it (PreferenceControl.ingestDefaults). The file gives the device a fixed test location on the National Mall in Washington, DC (38.8895, -77.0353).
The file uses ATAK’s own “restore location on restart” settings (recordedLocation, restoreRecordedLocation). ATAK’s RestoreLocationMapComponent loads those settings as a mock self position when the map starts. The same file sets the GPS option to “external only” (mockingOption IgnoreInternalGPS), because there is no GPS receiver. It marks ATAK’s GPS mode hint as seen (atak.hint.gps.device.mode). It sets atakControlForcePortrait so the screen fits the phone view. The file holds no secrets.
The location is not a GPS fix, and the device never presents it as one. The callsign is ATAK-DEVICE (TEST LOCATION). TAK, CloudTAK, and other clients show that callsign next to the marker. atak/ci/e2e.sh checks that TAK’s latest event from the device is at that point under that callsign.
The settings are not in the data package, because importing restoreRecordedLocation into a running ATAK makes it record the current (empty) self position over recordedLocation. Override the point with TEST_LAT, TEST_LON, and CALLSIGN.
After the device connects, the driver locks the map on the self marker and zooms in (atak-test-location.png). The self-coordinate overlay keeps a small red NO GPS source label. ATAK shows that label for any position that is not a live fix, including one placed by hand. That label is accurate for this device.

Why not password enrollment
Section titled “Why not password enrollment”ATAK always enrolls on 8446 with Hypertext Transfer Protocol (HTTP) Basic authentication (CertificateEnrollmentClient passes passIsToken=false). With auth default="file" TAK checks Basic credentials against its file authenticator and sends only bearer tokens to Keycloak, so a Keycloak password gets a 302 to the login page. Enrolling the device would need a TAK file user with a password. A certificate issued from the TAK CA needs no password user and matches how devices are provisioned in the field. The 8446 enrollment test in tests/ still covers the enrollment endpoint.
Provisioning device certificates
Section titled “Provisioning device certificates”For a real device, apply a TakClient in namespace takclients:
apiVersion: tak.uds.dev/v1alpha1kind: TakClientmetadata: name: alpha-1 namespace: takclientsspec: callsign: alpha-1 groups: - OperatorsWhen kubectl get takclient alpha-1 -n takclients shows Ready, Secret takclients/alpha-1 has package.zip. Copy it to the device’s Download folder as atak-alpha-1.dpk, or open it with ATAK’s Import Manager. The Secret also has client.pem, client.key, and ca.pem for other clients.
The Secret always keeps the full TakClient resource name. Newly issued Secrets also record that exact name in the tak.uds.dev/takclient annotation. The label with the same key keeps names up to 63 characters unchanged. For longer names, its value is sha256_ followed by the first 56 lowercase hexadecimal characters of the SHA-256 hash of the full name, encoded as UTF-8. Use that value for label selectors, or retrieve the Secret directly by its full name. Reconciliation and deletion use the full name rather than the label. spec.callsign still has its separate 4-to-63-character limit.
Delete the TakClient to remove the device. The watcher first revokes its certificate-table row through TAK’s certadmin API on 8443, which closes its streaming connection and rejects reconnects. It then deletes the file user and Secret and records the serial in the CRL as a backstop. Revoking a new TAK-issued certificate does not request a TAK restart. A pending legacy migration or periodic CRL-expiry refresh can still require one. A failed certificate lookup or revoke retains the finalizer and Secret for retry.
On upgrade, existing locally signed certificates are reissued through TAK. The previous certificate still takes the CRL restart path once; connected clients can be interrupted during this migration. Its reload request is retained until both API and messaging pods were created after that CRL update, even if another client is revoked meanwhile. Import the updated data package into devices after migration. Existing spec.validityDays fields remain accepted but are deprecated and ignored; change the global TAK CA lifetime instead. The random file-user password used for enrollment and recovery stays in watcher-only Secret takserver/takclient-enrollment. Device Secrets and data packages never include it; access to the device material does not grant Basic enrollment capability.
Migrating from tak.jonathanagustin.github.io
Section titled “Migrating from tak.jonathanagustin.github.io”Releases before tak.uds.dev/v1alpha1 served TakClient under tak.jonathanagustin.github.io/v1alpha1. Because the CustomResourceDefinition (CRD) is renamed, existing TakClient objects must be recreated under tak.uds.dev/v1alpha1:
The old controller revokes the certificate and removes its generated Secret when you delete a TakClient. Devices lose access from that point until they import the replacement package. Revocations recorded by the old controller persist across the API group change.
To migrate existing TakClient resources without stalling CRD removal:
-
Export existing
TakClientmanifests before upgrading:Terminal window kubectl get takclients.tak.jonathanagustin.github.io -n takclients -o yaml > takclients-backup.yaml -
Delete the old-group objects while the old controller is still running and let finalization complete:
Terminal window kubectl delete takclients.tak.jonathanagustin.github.io --all -n takclients -
Upgrade the TAK Server package. Confirm
kubectl get crd takclients.tak.uds.devsucceeds. -
Recreate each
TakClientfromtakclients-backup.yamlwithapiVersion: tak.uds.dev/v1alpha1(dropping cluster-managedmetadatafields andstatus), wait forReady, and distribute each updatedpackage.zipfrom Secrettakclients/<name>.
Network rules
Section titled “Network rules”The UDS Package atak sets ambient mesh for the viewer. The VM’s launcher pod carries istio.io/dataplane-mode: none and stays out of the mesh. ztunnel hands inbound connections to the pod from inside its network namespace. That path bypasses KubeVirt’s masquerade destination network address translation (DNAT), so adb never reached the guest (adb: device offline). Its traffic is still limited by these NetworkPolicies, and TAK traffic is mutual TLS from the device to TAK. adb from the viewer and the driver to the device is plain Transmission Control Protocol (TCP) inside the cluster.
Rules:
| Direction | Peer | Port | Why |
|---|---|---|---|
| Egress | device to istio-passthrough-gateway pods app=passthrough-ingressgateway |
8089 | CoT streaming over mutual TLS |
| Ingress and egress | viewer and device | 5555 | adb for the screen view |
| Ingress and egress | driver (app.kubernetes.io/name=atak-driver) and device |
5555 | test driver |
| Expose | tenant gateway host atak to the viewer |
8000 | phone view, behind Authservice |
adb on the device has no authentication (ro.adb.secure=0). Only the viewer and the driver can reach it.
The viewer’s Keycloak client is uds-atak-viewer and is limited to the group /UDS Core/Admin.
Policy exemptions
Section titled “Policy exemptions”atak/deploy/kubevirt-exemption.yaml is a UDS Exemption in uds-policy-exemptions:
virt-handlerruns privileged on the host (it manages/dev/kvm, cgroups, and the launcher’s network):DisallowPrivileged,RequireNonRootUser,DropAllCapabilities,RestrictCapabilities,RestrictHostPathWrite,RestrictVolumeTypes,DisallowHostNamespaces,RestrictSELinuxType.virt-operator,virt-api,virt-controller, andvirt-exportproxy:RequireNonRootUser,DropAllCapabilities,RestrictVolumeTypes.virt-launcher-atak-device-*inatak(the pod that runs QEMU, as UID 107):RestrictCapabilities(it addsNET_BIND_SERVICEfor masquerade networking),DropAllCapabilities,RestrictVolumeTypes,RestrictHostPathWrite,RestrictIstioTrafficOverrides(KubeVirt always adds thetraffic.sidecar.istio.io/kubevirtInterfacesannotation to launcher pods; only Istio sidecars read it, and there is no sidecar here).
Android-x86 notes
Section titled “Android-x86 notes”- The initrd silences the kernel log unless
DEBUGis set.DEBUG=0gives a verbose serial console without a debug shell. - Android-x86 renames
eth0towifi_ethand adds a virtual Wi-Fiwlan0.VIRT_WIFI=0keepseth0for the Ethernet service, which takes the KubeVirt masquerade Dynamic Host Configuration Protocol (DHCP) lease (cluster DNS included). The NIC model ise1000. - The ramdisk starts adbd on TCP 5555 and runs a boot report on the serial console (network, adb, display), keeps the screen on, and disables the crash-looping Android-x86 analytics app.