homeassistant.yaml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: homeassistant
  5. spec:
  6. replicas: 1
  7. selector:
  8. matchLabels:
  9. name: homeassistant
  10. template:
  11. metadata:
  12. labels:
  13. name: homeassistant
  14. spec:
  15. affinity:
  16. nodeAffinity:
  17. requiredDuringSchedulingIgnoredDuringExecution:
  18. nodeSelectorTerms:
  19. - matchExpressions:
  20. - key: net
  21. operator: In
  22. values:
  23. - local
  24. hostNetwork: true
  25. containers:
  26. - name: homeassistant
  27. image: ghcr.io/home-assistant/home-assistant:stable
  28. imagePullPolicy: "Always"
  29. env:
  30. volumeMounts:
  31. - name: homeassistant
  32. mountPath: /config
  33. ports:
  34. - containerPort: 8123
  35. name: http
  36. volumes:
  37. - name: homeassistant
  38. persistentVolumeClaim:
  39. claimName: homeassistant
  40. ---
  41. apiVersion: v1
  42. kind: Service
  43. metadata:
  44. name: homeassistant
  45. spec:
  46. ipFamilyPolicy: PreferDualStack
  47. type: NodePort
  48. selector:
  49. name: homeassistant
  50. ports:
  51. - protocol: TCP
  52. port: 8123
  53. targetPort: http
  54. nodePort: 31823
  55. name: http