kubernetes ingress-nginx k8设置配置控制器.customPorts

irlmq6kh  于 2023-06-21  发布在  Kubernetes
关注(0)|答案(2)|浏览(118)

依据:https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-helm/
我尝试安装带有自定义端口的ingress-nginx,但当我传入controller.customPorts参数时,它不会暴露这些端口。我想我传递的格式不对。文件上说

A list of custom ports to expose on the NGINX ingress controller pod. Follows the conventional Kubernetes yaml syntax for container ports.

有谁能告诉我这个格式应该是什么?

vfhzx4xs

vfhzx4xs1#

假设它们的意思是Pod定义中显示的内容:

- port: 1234
  name: alan
kse8i1jr

kse8i1jr2#

yaml文件配置的语法应该如下所示:

customPorts:
  - enable: true
    name: sftp
    nodePort: 31022
    port: 22

相关问题