【问题标题】:can't override NodePort value in helm configuration for portainer无法在搬运工的掌舵配置中覆盖 NodePort 值
【发布时间】:2021-12-07 17:48:41
【问题描述】:

我正在尝试安装portainer with helm

安装崩溃,因为集群上的 30777 端口已经很忙:

Error: INSTALLATION FAILED: Service "portainer" is invalid: spec.ports[0].nodePort: Invalid value: 30777: provided port is already allocated

所以我运行以下命令来覆盖端口值:

helm install -n sandbox-guiops  portainer portainer/portainer --set spec.ports[0].nodePort=40777

但无论如何我仍然遇到同样的错误。

我猜是因为我没有正确调用参数“nodePort”,但又一次:

helm show values portainer/portainer | grep -i port
# Default values for portainer.
    repository: portainer/portainer-ee
  repository: portainer/portainer-ce
  name: portainer-sa-clusteradmin
  # Set the httpNodePort and edgeNodePort only if the type is NodePort
  type: NodePort
  httpPort: 9000
  httpsPort: 9443
  httpNodePort: 30777
  httpsNodePort: 30779
  edgePort: 8000
  edgeNodePort: 30776

无论我使用“httpNodePort”还是其他任何东西,无论如何我仍然会收到相同的错误消息。

【问题讨论】:

    标签: kubernetes-helm portainer helm3


    【解决方案1】:

    基于this参考,我认为这应该通过

    --set service.httpNodePort=40777
    

    还可以在 helm 命令中执行--dry-run --debug,以在尝试安装之前检查是否填充了必要的值。

    【讨论】:

    • 太棒了,非常有道理,非常感谢! :)
    猜你喜欢
    • 2021-08-25
    • 2020-08-26
    • 2018-06-02
    • 2022-10-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-29
    • 2019-03-15
    相关资源
    最近更新 更多