# Home Assistant Deploy ## Namespace ```bash { cwd=../ terminalRows=15 } # from repo root folder kubectl create namespace home-assistant ``` ## Deployment ### Environments requirements ``` bash #./deploy/.env export ENDPOINT_IP="xxx.xxx.xxx.xxxx" export SERVICE_PORT=xxxx export INGRESS_ROUTES_MATCH="Host(`xxxx`)" export INGRESS_TLS_SECRET_NAME=xxxxxx ``` ## Test Templates ```bash { cwd=../ terminalRows=15 } # from repo root folder source ./deploy/.env \ && cat ./deploy/deployment.yaml \ && envsubst < ./deploy/service.template.yaml ``` ## Deploy ```bash { cwd=../ terminalRows=15 } # from repo root folder source ./deploy/.env \ && kubectl apply -f ./deploy/deployment.yaml \ && envsubst < ./deploy/service.template.yaml | kubectl apply -f - ``` ## Continuos Deploy All Environment variables requirements as set as secrets. [gitea workflow](../.gitea/workflows/deploy.yaml) ## RBAC ```bash { cwd=../ } kubectl apply -f ./deploy/rbac.yaml ```