Bootstrap¶
Bootstrap automates the full Home Assistant onboarding flow — no manual web UI interaction required. When enabled, the operator:
- Waits for the HA pod to become healthy
- Confirms the HA API is fully loaded (avoids the ambiguous 404 during cold start)
- Checks whether onboarding has already been completed
- Creates the admin user account
- Configures location, timezone, and analytics
- Generates a long-lived API token (10-year validity) and stores it in a Kubernetes Secret
The resulting token is used internally by the operator for hot-reload, Config Flow, and backup configuration.
Quick setup¶
# 1. Create credentials secret
kubectl create secret generic ha-admin \
--from-literal=username=admin \
--from-literal=password=changeme
apiVersion: ha.homeassistant.io/v1
kind: HomeAssistant
metadata:
name: home
spec:
version: "2025.6"
storage:
size: 10Gi
bootstrap:
enabled: true
credentials:
secretRef:
name: ha-admin
createApiToken: true
Bootstrap typically completes in 2–5 minutes on a fresh install.
Spec reference¶
spec.bootstrap.enabled¶
Set to true to activate bootstrap. Default: false.
spec.bootstrap.credentials.secretRef¶
Reference to a Kubernetes Secret with admin credentials.
bootstrap:
credentials:
secretRef:
name: ha-admin
usernameKey: username # optional, default: "username"
passwordKey: password # optional, default: "password"
spec.bootstrap.createApiToken¶
When true, the operator creates a long-lived API token after onboarding and stores it in a Secret named <ha-name>-homeassistant-api-token (or the value of apiTokenSecretName).
bootstrap:
createApiToken: true
apiTokenSecretName: home-homeassistant-api-token # optional, default: <ha-name>-homeassistant-api-token
spec.bootstrap.ownerName¶
Display name for the admin user account. Default: "Admin".
spec.bootstrap.language¶
Language code for the HA UI. Default: "en".
spec.bootstrap.location¶
Configures home location during onboarding.
bootstrap:
location:
name: "Home"
latitude: "52.237703"
longitude: "20.989075"
elevation: 100
unitSystem: "metric" # metric | us_customary
currency: "PLN"
timeZone: "Europe/Warsaw"
spec.bootstrap.analytics¶
Send anonymous usage analytics to Nabu Casa. Default: false.
Checking bootstrap status¶
# Retrieve the API token
kubectl get secret home-homeassistant-api-token -o jsonpath='{.data.token}' | base64 -d
API token Secret¶
The token Secret is named <ha-name>-homeassistant-api-token by default:
Other CRDs (HomeAssistantAutomation, HomeAssistantIntegration, etc.) automatically use this Secret — no manual wiring required.
Re-running bootstrap¶
Bootstrap is idempotent. If HA is already onboarded, the operator detects it and skips onboarding steps. If the API token Secret is missing, the operator re-creates it.
Note
Changing spec.bootstrap.credentials.secretRef after initial bootstrap has no effect on the running HA instance — HA stores credentials internally. To change the admin password, use the HA UI.