【问题标题】:How create deployement using helm3, that pulls image from docker hub?如何使用 helm 3 创建部署,从 docker hub 提取图像?
【发布时间】:2021-01-28 02:06:26
【问题描述】:

我的 repo 中有 docker 映像,akshay123007/lists-pods。我创建了舵图 图片:

 repository: akshay123007/lists-pods
  pullPolicy: IfNotPresent
  # Overrides the image tag whose default is the chart appVersion.
  tag: ""

imagePullSecrets: 
  - name: regcred 
nameOverride: ""
fullnameOverride: ""

serviceAccount:
  # Specifies whether a service account should be created
  create: true
  # Annotations to add to the service account
  annotations: {}
  # The name of the service account to use.
  # If not set and create is true, a name is generated using the fullname template
  name: ""

podAnnotations: {}

podSecurityContext: {}
  # fsGroup: 2000

securityContext: {}
  # capabilities:
  #   drop:
  #   - ALL
  # readOnlyRootFilesystem: true
  # runAsNonRoot: true
  # runAsUser: 1000

service:
  type: ClusterIP
  port: 80

ingress:
  enabled: false
  annotations: {}
    # kubernetes.io/ingress.class: nginx
    # kubernetes.io/tls-acme: "true"
  hosts:
    - host: chart-example.local
      paths: []
  tls: []
  #  - 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

autoscaling:
  enabled: false
  minReplicas: 1
  maxReplicas: 100
  targetCPUUtilizationPercentage: 80
  # targetMemoryUtilizationPercentage: 80

nodeSelector: {}

tolerations: []

affinity: {}

当我安装图表时,我收到错误:无法提取图像“akshay123007/lists-pods:1.16.0”:rpc 错误:代码 = 未知 desc = 来自守护进程的错误响应:akshay123007/lists-pods 的清单: 1.16.0 未找到:清单未知:清单未知。

我尝试更改图像:docker.io/akshay123007/lists-pods:latest,然后它说 errImagePull。我不知道是什么问题,任何帮助将不胜感激。

【问题讨论】:

  • 你确定你的 Docker 镜像中存在标签“1.16.0”吗?
  • 不,标签是最新的@VasiliAngapov
  • 请提供您的部署的 yaml
  • 默认采用图表版本。所以我删除了 {{.Values.tag...}}。能够成功提取图像,感谢您的关注。@VasiliAngapov

标签: docker kubernetes kubernetes-helm


【解决方案1】:

您忘记了应该将您的图像放在哪里的注册表。应该是这样的

image:  
    registry: YOUR_DOCKER_REGISTRY (EX: docker.io)  
    repository: akshay123007/lists-pods  

【讨论】:

    猜你喜欢
    • 2019-11-12
    • 2020-07-08
    • 1970-01-01
    • 1970-01-01
    • 2014-08-27
    • 1970-01-01
    • 2021-09-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多