--- apiVersion: v1 kind: PersistentVolume metadata: name: homeassistant spec: storageClassName: manual capacity: storage: 300Mi accessModes: - ReadWriteOnce nfs: path: /volume1/NFS/homeassistant server: 192.168.2.44 readOnly: false --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: homeassistant spec: storageClassName: manual accessModes: - ReadWriteOnce resources: requests: storage: 300Mi --- apiVersion: apps/v1 kind: Deployment metadata: name: homeassistant spec: replicas: 1 selector: matchLabels: name: homeassistant template: metadata: labels: name: homeassistant spec: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: net operator: In values: - local hostNetwork: true containers: - name: homeassistant image: ghcr.io/home-assistant/home-assistant:stable imagePullPolicy: "Always" env: volumeMounts: - name: homeassistant mountPath: /config ports: - containerPort: 8123 name: http volumes: - name: homeassistant persistentVolumeClaim: claimName: homeassistant --- apiVersion: v1 kind: Service metadata: name: homeassistant spec: ipFamilyPolicy: PreferDualStack type: NodePort selector: name: homeassistant ports: - protocol: TCP port: 8123 targetPort: http nodePort: 31823 name: http