0

I installed traefik via Helm from this repo: https://helm.traefik.io/traefik

It works, but it creates a persistent volume as hostPath which leads to a node affinity for the traefik pod. So it is not high available and it cannot be moved to another node (e. g. for updating this node).

How can I change this? For example using a NFS volume for traefik.

Here is the relevant part of the volume configuration:

spec:
  capacity:
    storage: 128Mi
  hostPath:
    path: >-
      /var/snap/microk8s/common/default-storage/traefik-traefik-pvc-3dd21e7b-260a-4053-a7f4-9fe6614e685b
    type: DirectoryOrCreate
  accessModes:
    - ReadWriteOnce
  claimRef:
    kind: PersistentVolumeClaim
    namespace: traefik
    name: traefik
    uid: 3dd21e7b-260a-4053-a7f4-9fe6614e685b
    apiVersion: v1
    resourceVersion: '6134234'
  persistentVolumeReclaimPolicy: Delete
  storageClassName: microk8s-hostpath
  volumeMode: Filesystem
  nodeAffinity:
    required:
      nodeSelectorTerms:
        - matchExpressions:
            - key: kubernetes.io/hostname
              operator: In
              values:
                - k8s-dev-02
Peter
  • 123
  • 4

0 Answers0