kevchu3 / home-assistant-k8s

Home Assistant on Kubernetes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Home Assistant for Kubernetes

Kubernetes Installation

Customize Home Assistant configuration:

$ vi configuration.yaml
$ base64 -w 0 configuration.yaml

Using the resource definitions provided in kubernetes/home-assistant.yaml, replace the configuration data in the Secret with the base64 output:

apiVersion: v1
kind: Secret
metadata:
  name: ha-config
  namespace: home-assistant
type: Opaque
data:
  configuration.yaml: IyBodHRwczovL3d3dy5ob21lLWFzc2lzdGFudC5pby9kb2NzL2NvbmZpZ3VyYXRpb24vCmRlZmF1bHRfY29uZmlnOgoKaHR0cDoKICB1c2VfeF9mb3J3YXJkZWRfZm9yOiB0cnVlCiAgdHJ1c3RlZF9wcm94aWVzOgogICAgLSAxMC4wLjAuMC84CiAgICAtIDE3Mi4xNi4wLjAvMTIKICAgIC0gMTkyLjE2OC4wLjAvMTYK    ### <---

Replace the ingress host with your resolvable hostname:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ha-ingress
  namespace: home-assistant
spec:
  rules:
  - host: home-assistant.example.com   ### <---
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: home-assistant
            port:
              number: 80

Create Kubernetes resources:

$ kubectl apply -f kubernetes/home-assistant.yaml

Red Hat OpenShift Installation

The application installation on Red Hat OpenShift leverages the use of imagestreams and ImageChange triggers on the DeploymentConfig to automatically update whenever a new image is available.

Instead of using the resource definitions in kubernetes/home-assistant.yaml, use openshift/home-assistant.yaml. Create an imagestream that tracks upstream image updates, along with the OpenShift resources:

$ oc import-image home-assistant --from=ghcr.io/home-assistant/home-assistant:latest --scheduled=true --confirm
$ oc apply -f openshift/home-assistant.yaml

Red Hat OpenShift GitOps Installation

The application can also be installed via OpenShift GitOps (ArgoCD). As a prerequisite, deploy the OpenShift GitOps operator and ArgoCD instance. The following installation assumes the ArgoCD instance has been deployed to the openshift-gitops namespace:

$ oc apply -f openshift/argocd.application.yaml

License

GPLv3

About

Home Assistant on Kubernetes

License:GNU General Public License v3.0