无法使用helm在kubernetes上设置docker private registry和持久存储

无法使用helm在kubernetes上设置docker private registry和持久存储,docker,kubernetes,docker-registry,Docker,Kubernetes,Docker Registry,我正试图与helm一起在kubernetes集群上建立docker私有注册表。但是我得到了一个pvc的错误。错误是: Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 22m

我正试图与helm一起在kubernetes集群上建立docker私有注册表。但是我得到了一个pvc的错误。错误是:

Events:
  Type     Reason       Age                  From                   Message
  ----     ------       ----                 ----                   -------
  Normal   Scheduled    22m                  default-scheduler      Successfully assigned docker-reg/docker-private-registry-docker-registry-6454b85dbb-zpdjc to 192.168.1.19
  Warning  FailedMount  2m10s (x9 over 20m)  kubelet, 192.168.1.19  Unable to mount volumes for pod "docker-private-registry-docker-registry-6454b85dbb-zpdjc_docker-reg(82c8be80-eb43-11e8-85c9-b06ebfd124ff)": timeout expired waiting for volumes to attach or mount for pod "docker-reg"/"docker-private-registry-docker-registry-6454b85dbb-zpdjc". list of unmounted volumes=[data]. list of unattached volumes=[auth data docker-private-registry-docker-registry-config default-token-xc4p7]
这个错误的原因可能是什么?我还尝试先创建一个pvc,然后将现有的pvc与docker registry的helm一起使用,但它给出了相同的错误

步骤:

  • 创建一个htpasswd文件
  • 编辑
    values.yml
    并将htpasswd文件的内容添加到
    htpasswd
  • 修改
    values.yml
    以启用持久性
  • 运行
    helm install stable/docker registry--namespace docker reg--name docker private registry--values helm docker reg/values.yml
  • values.yml
    文件:

    # Default values for docker-registry.
    # This is a YAML-formatted file.
    # Declare variables to be passed into your templates.
    replicaCount: 1
    
    updateStrategy:
      # type: RollingUpdate
      # rollingUpdate:
      #   maxSurge: 1
      #   maxUnavailable: 0
    
    podAnnotations: {}
    
    image:
      repository: registry
      tag: 2.6.2
      pullPolicy: IfNotPresent
    # imagePullSecrets:
        # - name: docker
    service:
      name: registry
      type: ClusterIP
      # clusterIP:
      port: 5000
      # nodePort:
      annotations: {}
      # foo.io/bar: "true"
    ingress:
      enabled: false
      path: /
      # Used to create an Ingress record.
      hosts:
        - chart-example.local
      annotations:
        # kubernetes.io/ingress.class: nginx
        # kubernetes.io/tls-acme: "true"
      tls:
        # Secrets must be manually created in the namespace.
        # - secretName: chart-example-tls
        #   hosts:
        #     - chart-example.local
    resources: {}
      # We usually recommend not to specify default resources and to leave this as a conscious
      # choice for the user. This also increases chances charts run on environments with little
      # resources, such as Minikube. If you do want to specify resources, uncomment the following
      # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
      # limits:
      #  cpu: 100m
      #  memory: 128Mi
      # requests:
      #  cpu: 100m
      #  memory: 128Mi
    persistence:
      accessMode: 'ReadWriteOnce'
      enabled: true
      size: 10Gi
      storageClass: 'rook-ceph-block'
    
    # set the type of filesystem to use: filesystem, s3
    storage: filesystem
    
    # Set this to name of secret for tls certs
    # tlsSecretName: registry.docker.example.com
    secrets:
      haSharedSecret: ""
      htpasswd: "dasdma:$2y$05$bnLaYEdTLawodHz2ULzx2Ob.OUI6wY6bXr9WUuasdwuGZ7TIsTK2W"
    # Secrets for Azure
    #   azure:
    #     accountName: ""
    #     accountKey: ""
    #     container: ""
    # Secrets for S3 access and secret keys
    #   s3:
    #     accessKey: ""
    #     secretKey: ""
    # Secrets for Swift username and password
    #   swift:
    #     username: ""
    #     password: ""
    
    # Options for s3 storage type:
    # s3:
    #  region: us-east-1
    #  bucket: my-bucket
    #  encrypt: false
    #  secure: true
    
    # Options for swift storage type:
    # swift:
    #  authurl: http://swift.example.com/
    #  container: my-container
    
    configData:
      version: 0.1
      log:
        fields:
          service: registry
      storage:
        cache:
          blobdescriptor: inmemory
      http:
        addr: :5000
        headers:
          X-Content-Type-Options: [nosniff]
      health:
        storagedriver:
          enabled: true
          interval: 10s
          threshold: 3
    
    securityContext:
      enabled: true
      runAsUser: 1000
      fsGroup: 1000
    
    priorityClassName: ""
    
    nodeSelector: {}
    
    tolerations: []
    

    它正在工作。问题出在此处记录的openebs存储上-

    您能否分享执行此操作的步骤@murarisumit添加了步骤共享如何在值中启用。yml@VKR附加值.yml