设置Helm图表以部署已推送到Azure容器注册表(ACR)的Nodejs服务

时间:2019-06-20 04:10:05

标签: node.js azure kubernetes-helm

我编写了一个Nodejs服务,并由docker构建。然后我将其推送到Azure Container Registry中。 我使用Helm从ACR提取存储库,然后将其部署到AKS,但服务未运行。 请告诉我一些建议。

Helm Value的代码。我必须设置服务的类型和端口。

replicaCount: 1

image:
  repository: tungthtestcontainer.azurecr.io/demonode
  tag: latest
  pullPolicy: IfNotPresent

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

service:
  name: http
  type: NodePort
  port: 8082
  internalPort: 8082

ingress:
  enabled: false
  annotations: {}
  hosts:
    - host: chart-example.local
      paths: []

  tls: []

resources: {}

nodeSelector: {}

tolerations: []

affinity: {}

1 个答案:

答案 0 :(得分:0)

要弄清楚在这种情况下会发生什么,直接使用kubectl apply掌舵还是Yaml无关紧要o是Azure还是其他提供商,建议您执行以下步骤:

  • 检查头盔上的释放状态,每次使用helm status <release-name>时都可以看到状态,尝试查看是否正确创建了这些容器以及服务是否还可以。
  • 使用kubectl describe deployment <deployment-name>
  • 检查部署
  • 使用kubectl describe pod <pod-name>
  • 检查广告连播
  • 使用kubectl logs -f <pod-name>
  • 检查pod日志

有了它,您应该能够找到源问题。