google-cloud-platform - Why GCP loadbalancer frontend has only two ports enabled?
问题描述
I am trying to create a load balancer in GCP. I have created two instance groups and each instance group has single vm attached to itself. One vm is having a port 80 and another vm is having a port enabled at 86.
The moment I create a load balancer, I find a frontend ip configuration always enabled at 80.
I am looking forward to something like this, ip:80 and ip:86. Since I am new to GCP, I am struggling with this part
解决方案
A forwarding rule and its corresponding IP address represent the frontend configuration of a Google Cloud load balancer. With Google cloud you can create a single forwarding rule with a single IP by adding 2 ports separated by comma. This port limitation for the TCP proxy load balancer and is due to the way TCP proxy load balancers are managed within the GCP internal infrastructure. It is not possible to use any port outside of this list.
For example: Create a named port for the instance group.
gcloud compute instance-groups set-named-ports us-ig2
--named-ports tcp110:110
--zone us-east1-b
gcloud compute health-checks create tcp my-tcp-health-check --port 110
推荐阅读
- mysql - SQL 语法错误:多重连接错误
- javascript - 设置整个网站的最大浏览器调整宽度
- html - 具有自动填充垂直间隙的响应式弹性布局?
- r - 如何在上面的行和行中匹配字符串
- javascript - 如何在窗口调整大小时刷新 mxGraph?
- excel - 我正在尝试在工作簿中的每个工作表中选择第 1-12 行,但它似乎在 10 张左右后出现问题,并且跳过了一些工作表
- twilio - Using a flow variable as the index in an array
- bash - 如何找到特定字符串的正则表达式
- c# - 在聊天中对齐 ListView 项目
- c# - 使用非常基本的 if 语句比较数字