Skip to content

Commit

Permalink
add gateway listener port on non-80, non-443 ports (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
2456868764 authored Nov 13, 2024
1 parent fe544c1 commit f17e0bd
Showing 1 changed file with 47 additions and 1 deletion.
48 changes: 47 additions & 1 deletion src/content/docs/latest/zh-cn/ops/how-tos/gateway-ports.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,50 @@ custom_edit_url: https://github.com/higress-group/higress-group.github.io/blob/m

# 修改 Gateway 监听端口

TBD
让 Gateway 监听非 80、443 端口,需要在安装或者升级时候指定监听非 80、443 端口。比如调整 80 端口到 8080,443 端口到 8443。

## Kubernetes 安装

helm 参数 values.yaml 配置调整如下:

```yaml
higress-core:
# Gateway 设置
gateway:
httpPort: 8080
httpsPort: 8443
service:
ports:
- name: http2
port: 80
protocol: TCP
targetPort: 8080
- name: https
port: 443
protocol: TCP
targetPort: 8443
```
可以通过以下命令快速安装 Higress 修改监听端口:
```shell
# 使用 Helm 在 Kubernetes 集群安装 Higress
helm install higress higress.io/higress -n higress-system -f ./values.yaml --create-namespace
# 使用 hgctl 在 Kubernetes 集群安装 Higress
hgctl install --set profile=k8s -f ./values.yaml
```

## Docker 环境安装

可以通过以下命令快速安装 Higress 修改监听端口:

```shell
# 使用 get-higress.sh 在 Docker 环境安装 Higress
curl -fsSL https://higress.io/standalone/get-higress.sh | bash -s -- ./higress --gateway-http-port=8080 --gateway-https-port=8443
# 使用 hgctl 在 Docker 环境安装 Higress
hgctl install --set profile=local-docker --set gateway.httpPort=8080 --set gateway.httpsPort=8443
```




0 comments on commit f17e0bd

Please sign in to comment.