Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-20797

can flink on k8s use pv using NFS and pvc as the hight avalibility storagedir

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • FLINK 1.12.0

       

    Description

      I want to deploy Flink on k8s with HA mode, and I don't want to deploy the HDFS cluster, and I have an NFS so that I am created a PV that use NFS as the backend storage, and I created a PVC for deployment mount.

      this is my FLINK configMap

      ```

      kubernetes.cluster-id: mta-flink
      high-availability: org.apache.flink.kubernetes.highavailability. KubernetesHaServicesFactory
      high-availability.storageDir: file:///opt/flink/nfs/ha

      ```

      and this is my jobmanager yaml file:

      ```

      volumeMounts:

      • name: flink-config-volume
        mountPath: /opt/flink/conf
      • name: flink-nfs
        mountPath: /opt/flink/nfs
        securityContext:
        runAsUser: 9999 # refers to user flink from official flink image, change if necessary
        #fsGroup: 9999
        volumes:
      • name: flink-config-volume
        configMap:
        name: mta-flink-config
        items:
      • key: flink-conf.yaml
        path: flink-conf.yaml
      • key: log4j-console.properties
        path: log4j-console.properties
      • name: flink-nfs
        persistentVolumeClaim:
        claimName: mta-flink-nfs-pvc

      ```

      It can be deployed successfully, but if I browser the jobmanager:8081 website, I get the result below:

      ```

      {"errors": ["Service temporarily unavailable due to an ongoing leader election. Please refresh."]}

      ```

       

      is the PVC can be used as `high-availability.storageDir`?  if it's can be used, how can I fix this error?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hayden zhou hayden zhou
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: