0

ホーム アシスタント用に、次の一連の yaml ファイルを作成しました。制御がしやすくなるので、helm よりも yaml を使用するのが好きです。私が抱えている問題は、保留モードでスタックしていることです。コンテキストについては、zwave スティックが接続されたノードにヒットするようにノード アフィニティを設定しました。ノードはラズベリー pi 4 - 8 GB です。ここに設定ファイルがあります

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    kompose.cmd: kompose convert
    kompose.version: 1.22.0 (955b78124)
  creationTimestamp: null
  labels:
    io.kompose.service: homeassistant
  name: homeassistant
  namespace: homeassistant
spec:
  replicas: 1
  selector:
    matchLabels:
      io.kompose.service: homeassistant
  strategy:
    type: Recreate
  template:
    metadata:
      annotations:
        kompose.cmd: kompose convert
        kompose.version: 1.22.0 (955b78124)
      labels:
        io.kompose.service: homeassistant
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: kubernetes.io/hostname
                operator: In
                values:
                - masternode
      containers:
        - env:
            - name: DISABLE_JEMALLOC
              value: "1"
          image: homeassistant/raspberrypi4-homeassistant:stable
          name: homeassistant
          ports:
            - containerPort: 8123
          resources: {}
          volumeMounts:
            - mountPath: /config
              name: homeassistant-pv-config
            - mountPath: /etc/localtime
              name: homeassistant-pv-time
              readOnly: true
      restartPolicy: Always
      volumes:
        - name: homeassistant-pv-config
          persistentVolumeClaim:
            claimName: homeassistant-pv-config
        - name: homeassistant-pv-time
          persistentVolumeClaim:
            claimName: homeassistant-pv-time
            readOnly: true
status: {}
---
apiVersion: v1
kind: Service
metadata:
  annotations:
    kompose.cmd: kompose convert
    kompose.version: 1.22.0 (955b78124)
  creationTimestamp: null
  labels:
    io.kompose.service: homeassistant
  name: homeassistant
  namespace: homeassistant
spec:
  ports:
    - name: "8123"
      port: 8123
      targetPort: 8123
  selector:
    io.kompose.service: homeassistant
status:
  loadBalancer: {}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  creationTimestamp: null
  labels:
    io.kompose.service: homeassistant-pv-config
  name: homeassistant-pv-config
  namespace: homeassistant
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 100Mi
status: {}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  creationTimestamp: null
  labels:
    io.kompose.service: homeassistant-pv-time
  name: homeassistant-pv-time
  namespace: homeassistant
spec:
  accessModes:
    - ReadOnlyMany
  resources:
    requests:
      storage: 100Mi
status: {}
---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: homeassistant-pv-config
  namespace: homeassistant
  labels:
    type: local
spec:
  storageClassName: local-path
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteOnce
  claimRef:
     namespace: homeassistant
     name: homeassistant-pv-config
  hostPath:
    path: "/home/pi/Software/homeassistant/config"
---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: homeassistant-pv-time
  namespace: homeassistant
  labels:
    type: local
spec:
  storageClassName: local-path
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteOnce
  claimRef:
     namespace: homeassistant
     name: homeassistant-pv-time
  hostPath:
    path: "/home/pi/Software/homeassistant/localtime"
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: homeassistant-ingress
  namespace: homeassistant
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
spec:
  rules:
  - host: homeassistant.local
    http:
      paths:
        - pathType: Prefix
          path: "/"
          backend:
            service:
              name: homeassistant
              port: 
                number: 8123

これまでに行ったトラブルシューティング: 明らかな開始、停止、クラスタとノードの再起動

SS-MacBook:homeassistant ss$ kubectl get pods -n homeassistant
NAME                             READY   STATUS    RESTARTS   AGE
homeassistant-78b4dd6c7d-sjw5n   0/1     Pending   0          8m9s

ログの出力は次のとおりです

SS-MacBook:homeassistant ss$ kubectl logs homeassistant-78b4dd6c7d-sjw5n -n homeassistant
No output shows up

イベント:

SS-MacBook:homeassistant ss$ kubectl get events -n homeassistant
LAST SEEN   TYPE      REASON                OBJECT                                        MESSAGE
58m         Warning   FailedScheduling      pod/homeassistant-7bc457756f-5zg4w            error while running "VolumeBinding" prebind plugin for pod "homeassistant-7bc457756f-5zg4w": Failed to bind volumes: timed out waiting for the condition
46m         Warning   FailedScheduling      pod/homeassistant-7bc457756f-5zg4w            error while running "VolumeBinding" prebind plugin for pod "homeassistant-7bc457756f-5zg4w": Failed to bind volumes: timed out waiting for the condition
36m         Warning   FailedScheduling      pod/homeassistant-7bc457756f-5zg4w            error while running "VolumeBinding" prebind plugin for pod "homeassistant-7bc457756f-5zg4w": Failed to bind volumes: timed out waiting for the condition
25m         Warning   FailedScheduling      pod/homeassistant-7bc457756f-5zg4w            error while running "VolumeBinding" prebind plugin for pod "homeassistant-7bc457756f-5zg4w": Failed to bind volumes: timed out waiting for the condition
12m         Normal    WaitForPodScheduled   persistentvolumeclaim/homeassistant-pv-time   waiting for pod homeassistant-7bc457756f-5zg4w to be scheduled
10m         Normal    ScalingReplicaSet     deployment/homeassistant                      Scaled down replica set homeassistant-7bc457756f to 0
10m         Warning   FailedScheduling      pod/homeassistant-7bc457756f-5zg4w            skip schedule deleting pod: homeassistant/homeassistant-7bc457756f-5zg4w
10m         Normal    SuccessfulDelete      replicaset/homeassistant-7bc457756f           Deleted pod: homeassistant-7bc457756f-5zg4w
10m         Normal    ScalingReplicaSet     deployment/homeassistant                      Scaled up replica set homeassistant-78b4dd6c7d to 1
10m         Warning   FailedScheduling      pod/homeassistant-7bc457756f-5zg4w            error while running "VolumeBinding" prebind plugin for pod "homeassistant-7bc457756f-5zg4w": Failed to bind volumes: timed out waiting for the condition
10m         Normal    SuccessfulCreate      replicaset/homeassistant-78b4dd6c7d           Created pod: homeassistant-78b4dd6c7d-sjw5n
2m55s       Normal    WaitForPodScheduled   persistentvolumeclaim/homeassistant-pv-time   waiting for pod homeassistant-78b4dd6c7d-sjw5n to be scheduled
38s         Warning   FailedScheduling      pod/homeassistant-78b4dd6c7d-sjw5n            error while running "VolumeBinding" prebind plugin for pod "homeassistant-78b4dd6c7d-sjw5n": Failed to bind volumes: timed out waiting for the condition

したがって、イベントの後、明らかにボリュームに問題がありますが、トリプル チェックを行ったところ、ボリュームが存在し、まだ他の何かにバインドされていません。何か案は?

4

0 に答える 0